Skip to content

Conversation

@tverskih
Copy link

Add a possibility to configure role prefix in project

@BorisMorel
Copy link
Owner

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

@tverskih
Copy link
Author

tverskih commented Nov 6, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants