fix: registration

fix: user deletion
This commit is contained in:
Andras Bacsai
2023-09-14 18:22:08 +02:00
parent 949407368e
commit 9f2fbc661a
3 changed files with 3 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ class User extends Authenticatable implements SendsEmail
if ($is_part_of_root_team && $is_admin_of_root_team) {
return true;
}
$role = $teams->where('id', auth()->user()->id)->first()->pivot->role;
$role = $teams->where('id', session('currentTeam')->id)->first()->pivot->role;
return $role === 'admin' || $role === 'owner';
}