Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 221bbb1

Browse files
Update voters.rst
1 parent 164aec4 commit 221bbb1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

security/voters.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ For more information take a look at
3333

3434
.. tip::
3535

36-
The advantage of voters is that you can reuse them in *many* places and centralize
37-
all permission logic. If you don't reuse permissions and the permissions are simple,
38-
you might want to do the check in the controller directly and throw an ``AccessDeniedException``
36+
The example used throughout this page features just two routes (``post_show`` and ``post_edit``).
37+
However, the advantage of voters is that you can reuse them in *many* places and centralize
38+
all permission logic. If you don't reuse permissions and the rules are simple, you instead
39+
might want to do the check in the controller directly and throw an ``AccessDeniedException``
3940
to create the correct response::
4041

4142
// src/AppBundle/Controller/PostController.php

0 commit comments

Comments
 (0)