Skip to content

Commit ea7a857

Browse files
authored
Add a note about voters with access_control
Explain how the Access Decision Strategy can impact the way access_control works.
1 parent 732b58c commit ea7a857

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

security/access_control.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ options:
160160
can learn how to use your custom attributes by reading
161161
:ref:`security/custom-voter`.
162162

163+
.. caution::
164+
165+
If you define both ``roles`` and ``allow_if``, and your Access Decision
166+
Strategy is the default one (``affirmative``), then the user will be granted
167+
access if there's at least one valid condition. See :doc:`/security/voters`
168+
to change your strategy to something more suited to your needs.
169+
163170
.. tip::
164171

165172
If access is denied, the system will try to authenticate the user if not

0 commit comments

Comments
 (0)