LdapBundle
LdapBundle copied to clipboard
Make role prefix configurable
Add a possibility to configure role prefix in project
Currently, I do not merge this.
All roles must begin with the ROLE_ prefix to be managed by Symfony2.
If you define your own roles with a dedicated Role class (more advanced), don't use the ROLE_ prefix.
http://symfony.com/doc/current/book/security.html#roles
Here I made another change: roles are always prepended with "ROLE_" prefix but additional sub prefix can be added between prefix and role name.
The purpose is to distinct two types of roles: integrated symfony roles (e.g. ADMIN, USER) and dynamic roles which are sent by LDAP.
Our app has an integrated 'Admin' role and if the role with the same name will be received dynamically the user will be granted with all the rights of the integrated "Admin" role.