Skip to content

Commit 8e5a4ee

Browse files
committed
Better explain the use of multiple roles in access_control
1 parent ac45677 commit 8e5a4ee

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)