Skip to content

Commit 74e08f5

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: Update description for Access decision strategies
2 parents 8c0f61c + e4ec52b commit 74e08f5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

security/voters.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,12 @@ There are three strategies available:
278278
This grants access as soon as there is *one* voter granting access;
279279

280280
``consensus``
281-
This grants access if there are more voters granting access than denying;
281+
This grants access if there are more voters granting access than
282+
denying. If case of a tie the decision is based on the
283+
``allow_if_equal_granted_denied`` config option (defaulting to ``true``);
282284

283285
``unanimous``
284-
This only grants access if there is no voter denying access. If all voters
285-
abstained from voting, the decision is based on the ``allow_if_all_abstain``
286-
config option (which defaults to ``false``);
286+
This only grants access if there is no voter denying access.
287287

288288
``priority``
289289
This grants or denies access by the first voter that does not abstain,
@@ -293,6 +293,10 @@ There are three strategies available:
293293

294294
The ``priority`` version strategy was introduced in Symfony 5.1.
295295

296+
Regardless the chosen strategy, if all voters abstained from voting, the
297+
decision is based on the ``allow_if_all_abstain`` config option (which
298+
defaults to ``false``).
299+
296300
In the above scenario, both voters should grant access in order to grant access
297301
to the user to read the post. In this case, the default strategy is no longer
298302
valid and ``unanimous`` should be used instead. You can set this in the

0 commit comments

Comments
 (0)