Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Security] Remove using multiple attributes with #[IsGranted]#47144

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@HypeMC
Copy link
Member

QA
Branch?6.2
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#46978 (comment)
LicenseMIT
Doc PR-

Passing multiple attributes toisGranted() has been removed in#33584, so the following doesn't work any more:

#[IsGranted(attributes: ['ROLE_ADMIN'])]publicfunctionindex(Post$post){}#[IsGranted(attributes: ['ROLE_USER','ROLE_ADMIN'])]publicfunctionindex(Post$post){}

As mentioned insensiolabs/SensioFrameworkExtraBundle#648 , expressions should be used instead, see#46978 . This PR removes the possibility of using multiple attributes with#[IsGranted].

Also, it's currently possible to use#[IsGranted()] with no attributes (null). Since this doesn't seem to work either, nor can I find a reason why it even should, this PR removes that option as well. If I'm wrong about this one, please let me know.

@nicolas-grekas
Copy link
Member

Thank you@HypeMC.

@nicolas-grekasnicolas-grekas merged commit445f0f1 intosymfony:6.2Aug 2, 2022
@HypeMCHypeMC deleted the remove-isgranted-multiple-attributes branchAugust 2, 2022 07:57
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr approved these changes

@wouterjwouterjAwaiting requested review from wouterjwouterj is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

4 participants

@HypeMC@nicolas-grekas@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp