mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
fix new user bug (#197)
This commit is contained in:
@ -22,7 +22,7 @@ public function handle(Request $request, Closure $next): Response
|
||||
/** @var User $user */
|
||||
$user = $request->user();
|
||||
|
||||
if ($server->project_id != $user->current_project_id) {
|
||||
if ($server->project_id != $user->current_project_id && $user->can('view', $server)) {
|
||||
$user->current_project_id = $server->project_id;
|
||||
$user->save();
|
||||
}
|
||||
|
Reference in New Issue
Block a user