Skip to content

Commit 6840582

Browse files
committed
Minor improvements
1 parent 11490c2 commit 6840582

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

security/access_control.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Take the following ``access_control`` entries as an example:
4444
- { path: '^/admin', roles: ROLE_USER_IP, ip: 127.0.0.1 }
4545
- { path: '^/admin', roles: ROLE_USER_HOST, host: symfony\.com$ }
4646
- { path: '^/admin', roles: ROLE_USER_METHOD, methods: [POST, PUT] }
47-
# when defining multiple roles, users must have at least one of them (it's like an OR condition)
47+
# when defining multiple roles, it could be like an OR or AND condition depending on the 'affirmative' or 'unanimous' strategy used
4848
- { path: '^/admin', roles: [ROLE_MANAGER, ROLE_ADMIN] }
4949
5050
.. code-block:: xml
@@ -63,7 +63,7 @@ Take the following ``access_control`` entries as an example:
6363
<rule path="^/admin" role="ROLE_USER_IP" ip="127.0.0.1"/>
6464
<rule path="^/admin" role="ROLE_USER_HOST" host="symfony\.com$"/>
6565
<rule path="^/admin" role="ROLE_USER_METHOD" methods="POST, PUT"/>
66-
<!-- when defining multiple roles, users must have at least one of them (it's like an OR condition) -->
66+
<!-- when defining multiple roles, it could be like an OR or AND condition depending on the 'affirmative' or 'unanimous' strategy used -->
6767
<rule path="^/admin" roles="ROLE_ADMIN, ROLE_MANAGER"/>
6868
</config>
6969
</srv:container>
@@ -97,7 +97,7 @@ Take the following ``access_control`` entries as an example:
9797
],
9898
[
9999
'path' => '^/admin',
100-
// when defining multiple roles, users must have at least one of them (it's like an OR condition)
100+
// when defining multiple roles, it could be like an OR or AND condition depending on the 'affirmative' or 'unanimous' strategy used
101101
'roles' => ['ROLE_MANAGER', 'ROLE_ADMIN'],
102102
],
103103
],
@@ -156,7 +156,8 @@ options:
156156

157157
* ``roles`` If the user does not have the given role, then access is denied
158158
(internally, an :class:`Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException`
159-
is thrown). If this value is an array of multiple roles, the user must have
159+
is thrown). If this value is an array of multiple roles, the user must have:
160+
160161
* at least one of them when using the default ``affirmative`` strategy
161162
* all of them when using the ``unanimous`` strategy
162163
in the :ref:`Access Decision Manager <components-security-access-decision-manager>`.

0 commit comments

Comments
 (0)