userli
userli copied to clipboard
Don't show ROLE_ADMIN as an option for domain admins
I'm refering to the account creation dialog (/admin/user/create) as well to the edit dialog (admin/user/[0-9]*/edit)
As a domain admin the role select fiel present all availble roles - even the role ROLE_ADMIN. Selecting this role ends in an error message when I hit the save button:
request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException:
"Access Denied to the action create and role CREATE" at /opt/userli/userli/3.1.0/vendor/symfony/security-http/Firewall/ExceptionListener.php line 137
{"exception":" [object] (Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException(code: 0): Access Denied to the action create and role CREATE at /opt/userli/userli/3.1.0/vendor/symfony/security-http/Firewall/ExceptionListener.php:137,
Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): Access Denied to the action create and role CREATE at /opt/userli/userli/3.1.0/vendor/sonata-project/admin-bundle/src/Admin/AbstractAdmin.php:2968)"}
Maybe it would be a possibility to hiden this role from domain admins?