We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5cae596 + 66831a6 commit 1fccbf6Copy full SHA for 1fccbf6
book/security.rst
@@ -817,7 +817,7 @@ You can easily deny access from inside a controller::
817
$this->denyAccessUnlessGranted('ROLE_ADMIN', null, 'Unable to access this page!');
818
819
// Old way :
820
- // if (false === $this->get('security.context')->isGranted('ROLE_ADMIN')) {
+ // if (false === $this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')) {
821
// throw $this->createAccessDeniedException('Unable to access this page!');
822
// }
823
0 commit comments