Skip to content

Commit 97599f7

Browse files
committed
Fix isGranted to decide
1 parent 6c5aa0b commit 97599f7

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)