8000 Merge branch '7.1' into 7.2 · symfony/symfony-docs@41a647a · GitHub
[go: up one dir, main page]

Skip to content

Commit 41a647a

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: Fix isGranted to decide
2 parents 13c8fb7 + 6996e69 commit 41a647a

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
@@ -394,12 +394,12 @@ logic you want::
394394
}
395395

396396
// you can still check for ROLE_ALLOWED_TO_SWITCH
397-
if ($this->accessDecisionManager->isGranted($token, ['ROLE_ALLOWED_TO_SWITCH'])) {
397+
if ($this->accessDecisionManager->decide($token, ['ROLE_ALLOWED_TO_SWITCH'])) {
398398
return true;
399399
}
400400

401401
// check for any roles you want
402-
if ($this->accessDecisionManager->isGranted($token, ['ROLE_TECH_SUPPORT'])) {
402+
if ($this->accessDecisionManager->decide($token, ['ROLE_TECH_SUPPORT'])) {
403403
return true;
404404
}
405405

security/voters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ with ``ROLE_SUPER_ADMIN``::
261261
// ...
262262

263263
// ROLE_SUPER_ADMIN can do anything! The power!
264-
if ($this->accessDecisionManager->isGranted($token, ['ROLE_SUPER_ADMIN'])) {
264+
if ($this->accessDecisionManager->decide($token, ['ROLE_SUPER_ADMIN'])) {
265265
return true;
266266
}
267267

0 commit comments

Comments
 (0)
0