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 special case for#[IsGranted()] subject#48102

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?no
New feature?no
Deprecations?no
TicketsFix#48080 (comment)
LicenseMIT
Doc PR-

Addresses a comment by@stof

Instead of havingrequest as a special case, an expression can be used instead:

-#[IsGranted(attribute: 'SOME_ATTRIBUTE', subject: 'request')]+#[IsGranted(attribute: 'SOME_ATTRIBUTE', subject: new Expression('request'))]public function index(){}

useSymfony\Component\HttpKernel\Exception\HttpException;
useSymfony\Component\HttpKernel\HttpKernelInterface;
useSymfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
useSymfony\Component\Security\Core\Authorization\ExpressionLanguage;
Copy link
MemberAuthor

@HypeMCHypeMCNov 3, 2022
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is a mistake I made in my original PR#46978

@chalasr
Copy link
Member

Thank you@HypeMC.

@chalasrchalasr merged commit4d4c411 intosymfony:6.2Nov 4, 2022
@HypeMCHypeMC deleted the make-request-always-available-to-isgranted-2 branchNovember 4, 2022 12:17
fabpot added a commit to symfony/symfony-docs that referenced this pull requestMar 24, 2023
… (HypeMC)This PR was merged into the 6.2 branch.Discussion----------[Security] Use expression for `#[IsGranted()]` subjectsymfony/symfony#46978symfony/symfony#48080symfony/symfony#48102Commits-------9d4045f [Security] Use expression for #[IsGranted()] subject
weaverryan pushed a commit to symfony/symfony-docs that referenced this pull requestMar 28, 2023
… (HypeMC)This PR was merged into the 6.2 branch.Discussion----------[Security] Use expression for `#[IsGranted()]` subjectsymfony/symfony#46978symfony/symfony#48080symfony/symfony#48102Commits-------9d4045f [Security] Use expression for #[IsGranted()] subject
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof 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@chalasr@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp