Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make role prefix configurable #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants