Symfony2 - Why voters are called even for SuperAdmins
In the IddqdVoter
class, you have a special role called ROLE_IDDQD
.
This voter adds a special role ROLE_IDDQD
which effectively bypasses any, and all security checks (including voters).
This is what you're looking for. More : IDDQD Voter
You can even set an alias for the IDDQD role, so I guess that you can alias the ROLE_SUPER_ADMIN
to the ROLE_IDDQD
. If you can't do that, simply grant the ROLE_SUPER_ADMIN
the ROLE_IDDQD
and you're ready to go.
In order to use this special role, you'll have to enable it by doing so :
#config.ymljms_security_extra: enable_iddqd_attribute: true