Skip to content

fix RoleVoter behaviour description #10580

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

Merged
merged 1 commit into from
Oct 26, 2018
Merged

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Oct 25, 2018

No description provided.

@xabbuh xabbuh added this to the 2.8 milestone Oct 25, 2018
@xabbuh
Copy link
Member Author

xabbuh commented Oct 25, 2018

The access decision manager strategy defines how the decision should be made when multiple voters voted on an attribute. It does not affect the behaviour of the RoleVoter (and in fact I don't see that its behaviour can be changed, see https://github.com/symfony/symfony/blob/9c8d0999b349960ff34a072343143655d1b35a40/src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php#L39-L54).

@xabbuh
Copy link
Member Author

xabbuh commented Oct 25, 2018

I think we should also change the documentation here to not talk about roles. is_granted() actually allows to get a decision for any attribute for which there are voters and is not limited to roles.

@javiereguiluz
Copy link
Member

Thanks for fixing this bug. I wasn't sure about this, so I should have checked the source code before merging. I'm sorry. I also agree with replacing "role" by "permission" or something like that here and in the rest of the docs where appropriate.

@javiereguiluz javiereguiluz merged commit f71cf80 into symfony:2.8 Oct 26, 2018
javiereguiluz added a commit that referenced this pull request Oct 26, 2018
This PR was merged into the 2.8 branch.

Discussion
----------

fix RoleVoter behaviour description

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).

-->

Commits
-------

f71cf80 fix RoleVoter behaviour description
@xabbuh xabbuh deleted the pr-10461 branch October 26, 2018 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants