feat: superadmin attribute for extended permissions like impersonating
This commit is contained in:
@@ -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