Skip to content

Commit f644b5c

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: Fix isGranted to decide
2 parents 2c5dc95 + 5f1dda8 commit f644b5c

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
@@ -402,12 +402,12 @@ logic you want::
402402
}
403403

404404
// you can still check for ROLE_ALLOWED_TO_SWITCH
405-
if ($this->accessDecisionManager->isGranted($token, ['ROLE_ALLOWED_TO_SWITCH'])) {
405+
if ($this->accessDecisionManager->decide($token, ['ROLE_ALLOWED_TO_SWITCH'])) {
406406
return true;
407407
}
408408

409409
// check for any roles you want
410-
if ($this->accessDecisionManager->isGranted($token, ['ROLE_TECH_SUPPORT'])) {
410+
if ($this->accessDecisionManager->decide($token, ['ROLE_TECH_SUPPORT'])) {
411411
return true;
412412
}
413413

security/voters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ with ``ROLE_SUPER_ADMIN``::
265265
// ...
266266

267267
// ROLE_SUPER_ADMIN can do anything! The power!
268-
if ($this->accessDecisionManager->isGranted($token, ['ROLE_SUPER_ADMIN'])) {
268+
if ($this->accessDecisionManager->decide($token, ['ROLE_SUPER_ADMIN'])) {
269269
return true;
270270
}
271271

0 commit comments

Comments
 (0)