8000 minor #9844 Better explain the use of multiple roles in access_contro… · Nek-/symfony-docs@72181cc · GitHub
[go: up one dir, main page]

Skip to content

Commit 72181cc

Browse files
committed
minor symfony#9844 Better explain the use of multiple roles in access_control (javiereguiluz)
This PR was merged into the 2.8 branch. Discussion ---------- Better explain the use of multiple roles in access_control This fixes symfony#8355. Commits ------- 8e5a4ee Better explain the use of multiple roles in access_control
2 parents b46bce1 + 8e5a4ee commit 72181cc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

security/access_control.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,12 @@ Once Symfony has decided which ``access_control`` entry matches (if any),
131131
it then *enforces* access restrictions based on the ``roles``, ``allow_if`` and ``requires_channel``
132132
options:
133133

134-
* ``roles`` If the user does not have the given role(s), then access is denied
134+
* ``roles`` If the user does not have the given role, then access is denied
135135
(internally, an :class:`Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException`
136-
is thrown);
136+
is thrown). If this value is an array of multiple roles, the user must have
137+
at least one of them (when using the default ``affirmative`` strategy in the
138+
:ref:`Access Decision Manager <components-security-access-decision-manager>`)
139+
or all of them when using the ``unanimous`` strategy;
137140

138141
* ``allow_if`` If the expression returns false, then access is denied;
139142

0 commit comments

Comments
 (0)
0