ref 2995. Actualizas roles.
parent
6b8cd0834b
commit
92ee730bab
|
|
@ -71,6 +71,7 @@ readonly class ClientProcessor implements ProcessorInterface
|
|||
if ($currentUser instanceof User
|
||||
&& !in_array(UserGroupPermissions::ROLE_SUPER_ADMIN, $currentUser->getRoles())
|
||||
&& !in_array(UserGroupPermissions::ROLE_ORGANIZATIONAL_UNIT_ADMIN, $currentUser->getRoles())
|
||||
&& !in_array(UserGroupPermissions::ROLE_ORGANIZATIONAL_UNIT_OPERATOR, $currentUser->getRoles())
|
||||
) {
|
||||
throw new AccessDeniedException('You are not allowed to create clients.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ readonly class OrganizationalUnitProcessor implements ProcessorInterface
|
|||
if ($user instanceof User) {
|
||||
if (!in_array(UserGroupPermissions::ROLE_SUPER_ADMIN, $user->getRoles())
|
||||
&& !in_array(UserGroupPermissions::ROLE_ORGANIZATIONAL_UNIT_ADMIN, $user->getRoles())
|
||||
&& !in_array(UserGroupPermissions::ROLE_ORGANIZATIONAL_UNIT_OPERATOR, $user->getRoles())
|
||||
) {
|
||||
throw new AccessDeniedException('You are not allowed to create organizational units.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue