Skip to content

Commit 188b654

Browse files
Erikxabbuh
Erik
authored andcommitted
Update voters.rst
Made clear the difference between using denyAccessUnlessGranted and isGranted - the former is NOT just a shortcut to calling isGranted.
1 parent be94483 commit 188b654

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

security/voters.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ decides this using whatever logic you want.
102102

103103
The ``denyAccessUnlessGranted()`` and ``isGranted()`` functions are both
104104
just shortcuts of the ``Controller`` class to call ``isGranted()`` on
105-
the ``security.authorization_checker`` service.
106-
105+
  the ``security.authorization_checker`` service. ``denyAccessUnlessGranted()`` will throw an ``AccessDeniedException``, whereas ``isGranted()`` will return a boolean.
106+
107107
Creating the custom Voter
108108
-------------------------
109109

0 commit comments

Comments
 (0)