-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Security] Clarification on use of multiple roles within access_control #8355
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
Comments
Maybe @chalasr, who knows Symfony Security really well, can help us here. Thanks! |
When setting multiple I agree that this could be made more explicit in the |
Fixed by #9844. |
@chalasr @javiereguiluz Thanks for the clarification! |
The access_control documentation does not mention behaviour when restricting access by multiple roles.
The comment
If the user does not have the given role(s), then access is denied
seems to suggest that multiple roles should be possible and that, when defined with multiple roles, access is denied unless the user has ALL of the specified roles.In practice though, the result of this is dependent upon the access decision manager strategy. It is unclear if this is intended but undocumented behaviour, or an issue that needs to be raised in Symfony.
The response to a related issue from 2013 (#3290) suggests that multiple roles will be handled with OR logic, but this does not seem to be the case, and I can't find anything in the documentation to confirm this.
The text was updated successfully, but these errors were encountered: