Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 72181cc

Browse filesBrowse files
committed
minor #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 #8355. Commits ------- 8e5a4ee Better explain the use of multiple roles in access_control
2 parents b46bce1 + 8e5a4ee commit 72181cc
Copy full SHA for 72181cc

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed

‎security/access_control.rst

Copy file name to clipboardExpand all lines: security/access_control.rst
+5-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.