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

Support custom role with RoleSecurityHandler #7299

Merged
merged 1 commit into from
Jul 12, 2021

Conversation

VincentLanglet
Copy link
Member

Subject

Closes #5992
I am targeting this branch, because BC.

Prior to this, when using isGranted with something like ROLE_USER it was transformed to ROLE_FOOADMIN_ROLE_USER, which feel really unnatural and buggy.

Now,

  • if we pass the full role, no prefix is added
  • if we pass a string not starting by ROLE, the prefix is added.

Changelog

### Added
- Added support for non admin prefixed `ROLE_*` roles by the RoleSecurityHandler.

@VincentLanglet VincentLanglet requested a review from a team July 2, 2021 11:25
@VincentLanglet
Copy link
Member Author

friendly ping @sonata-project/contributors

@VincentLanglet VincentLanglet merged commit 1235808 into sonata-project:3.x Jul 12, 2021
@VincentLanglet VincentLanglet deleted the roleSecurity branch July 13, 2021 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Question] _ALL Role return true for ROLE_ALLOWED_TO_SWITCH and something weird about isGranted()
3 participants