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

Add explenation about RoleVoter prefix #90

Open
Patrick-Beuks opened this issue May 1, 2022 · 1 comment
Open

Add explenation about RoleVoter prefix #90

Patrick-Beuks opened this issue May 1, 2022 · 1 comment

Comments

@Patrick-Beuks
Copy link

This took me a hot minut to debug why something like a SCOPE_ prefix did not work out of the box.

Symfony's RoleVoter uses a prefix for IsGranted to be able to vote. By default this is ROLE_. The easiest fix would be to add information about this to the documentation in the two places below. Where it is stated that it needs to start with the prefix defined for RoleVoter

A better fix would be to find what this prefix is and add it, if it is not already the prefix.

# Set a custom prefix that replaces the default 'ROLE_OAUTH2_' role prefix
role_prefix: ROLE_OAUTH2_

->scalarNode('role_prefix')
->info('Set a custom prefix that replaces the default \'ROLE_OAUTH2_\' role prefix')
->defaultValue('ROLE_OAUTH2_')

@fastmanu
Copy link

Same here

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

No branches or pull requests

2 participants