Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Security] Improve DX of recent additions#59805
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
a07496e
to8d7316b
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Security/Http/EventListener/IsGrantedAttributeListener.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
8d7316b
tod74e07a
CompareThanks for the reviews, comments addressed. Status: needs review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Great improvement to the DX, thanks!
d74e07a
toaa38eb8
CompareI just removed the |
chalasr commentedFeb 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
isn't fabbot's patch legit? |
I think this alignment rule doesn't work when the type description is too long, so I ignored fabbot on purpose... |
Thank you@nicolas-grekas. |
0c7c251
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This is a follow up of#48142 and#59150 which were merged recently into 7.3.
Summary of the changes:
UserAuthorizationChecker
, the implementation of the corresponding interface is merged into the existingAuthorizationChecker
.AuthorizationChecker::isGranted()
is made aware of token changed by its newisGrantedForUser()
method, so that calls tois_granted()
nested intois_granted_for_user()
calls will check the provided user, not the logged in one.IsGranted
's closures by 1. a newIsGrantedContext
and 2. the$subject
. This makes everything simpler, easier to discover, and more extensible. Thanks to the previous item, IsGrantedContext only needs the auth-checker, not the access-decision-manager anymore. Simpler again.