feat: superadmin attribute for extended permissions like impersonating
This commit is contained in:
1 parent
30218d6f80
commit
8b4e9f546b
4 files changed
+61
-1
No files matched your search
@@ -40,6 +40,10 @@ class ImpersonationVoter extends Voter
|
||||
}
|
||||
|
||||
// Admin is the only role allowed to impersonate
|
||||
return $this->security->isGranted('ROLE_ADMIN');
|
||||
if (false === $this->security->isGranted('ROLE_ADMIN')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $currentUser->isSuperAdmin();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user