Skip to content

Commit 2402aef

Browse files
committed
Fix documentation for consensus strategy
1 parent 36d47ff commit 2402aef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

security/access_control.rst

Lines changed: 4 additions & 3 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, it could be like an OR or AND condition depending on the 'affirmative' or 'unanimous' strategy used
47+
# when defining multiple roles, the behavior depends on the strategy used in Access Decission Manager
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, it could be like an OR or AND condition depending on the 'affirmative' or 'unanimous' strategy used -->
66+
<!-- when defining multiple roles, the behavior depends on the strategy used in Access Decission Manager -->
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, it could be like an OR or AND condition depending on the 'affirmative' or 'unanimous' strategy used
100+
// when defining multiple roles, the behavior depends on the strategy used in Access Decission Manager
101101
'roles' => ['ROLE_MANAGER', 'ROLE_ADMIN'],
102102
],
103103
],
@@ -159,6 +159,7 @@ options:
159159
is thrown). If this value is an array of multiple roles, the user must have:
160160

161161
* at least one of them when using the default ``affirmative`` strategy.
162+
* more granted than denied roles when using the ``consensus`` strategy.
162163
* all of them when using the ``unanimous`` strategy.
163164

164165
For more details about different strategies, see :ref:`Access Decision Manager <components-security-access-decision-manager>`.

0 commit comments

Comments
 (0)