@@ -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, 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, users must have at least one of them (it's like an OR condition) -->
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, users must have at least one of them (it's like an OR condition)
100+ // when defining multiple roles, the behavior depends on the strategy used in Access Decission Manager
101101 'roles' => ['ROLE_MANAGER', 'ROLE_ADMIN'],
102102 ],
103103 ],
@@ -156,8 +156,13 @@ 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
160- at least one of them.
159+ is thrown). If this value is an array of multiple roles, the user must have:
160+
161+ * at least one of them when using the default ``affirmative `` strategy.
162+ * more granted than denied roles when using the ``consensus `` strategy.
163+ * all of them when using the ``unanimous `` strategy.
164+
165+ For more details about different strategies, see :ref: `Access Decision Manager <components-security-access-decision-manager >`.
161166
162167* ``allow_if `` If the expression returns false, then access is denied;
163168
0 commit comments