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

Commit5f1dda8

Browse files
committed
bug#20403 [Security] Fix wrong method call of the decision manager (Oliver Kossin)
This PR was merged into the 5.4 branch.Discussion----------[Security] Fix wrong method call of the decision manager`@xabbuh` changed the use of “decision manage” in [PR-20388](#20388) However, the method is described differently in the [interface](https://github.com/symfony/symfony/blob/7.2/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php#L29).It's not `isGranted` its `decide`Commits-------97599f7 Fix isGranted to decide
2 parents6c5aa0b +97599f7 commit5f1dda8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎security/impersonating_user.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,12 @@ logic you want::
337337
}
338338

339339
// you can still check for ROLE_ALLOWED_TO_SWITCH
340-
if ($this->accessDecisionManager->isGranted($token, ['ROLE_ALLOWED_TO_SWITCH'])) {
340+
if ($this->accessDecisionManager->decide($token, ['ROLE_ALLOWED_TO_SWITCH'])) {
341341
return true;
342342
}
343343

344344
// check for any roles you want
345-
if ($this->accessDecisionManager->isGranted($token, ['ROLE_TECH_SUPPORT'])) {
345+
if ($this->accessDecisionManager->decide($token, ['ROLE_TECH_SUPPORT'])) {
346346
return true;
347347
}
348348

‎security/voters.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ with ``ROLE_SUPER_ADMIN``::
248248
// ...
249249

250250
// ROLE_SUPER_ADMIN can do anything! The power!
251-
if ($this->accessDecisionManager->isGranted($token, ['ROLE_SUPER_ADMIN'])) {
251+
if ($this->accessDecisionManager->decide($token, ['ROLE_SUPER_ADMIN'])) {
252252
return true;
253253
}
254254

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp