@@ -26,7 +26,7 @@ uses the authorization checker), or by
26
26
27
27
Ultimately, Symfony takes the responses from all voters and makes the final
28
28
decision (to allow or deny access to the resource) according to the strategy defined
29
- in the application, which can be: affirmative, consensus or unanimous .
29
+ in the application, which can be: affirmative, consensus, unanimous or priority .
30
30
31
31
For more information take a look at
32
32
:ref: `the section about access decision managers <components-security-access-decision-manager >`.
@@ -262,7 +262,7 @@ checks if the user is a member of the site and a second one that checks if the u
262
262
is older than 18.
263
263
264
264
To handle these cases, the access decision manager uses an access decision
265
- strategy. You can configure this to suit your needs. There are three
265
+ strategy. You can configure this to suit your needs. There are four
266
266
strategies available:
267
267
268
268
``affirmative `` (default)
@@ -274,7 +274,16 @@ strategies available:
274
274
``unanimous ``
275
275
This only grants access if there is no voter denying access. If all voters
276
276
abstained from voting, the decision is based on the ``allow_if_all_abstain ``
277
- config option (which defaults to ``false ``).
277
+ config option (which defaults to ``false ``);
278
+
279
+ ``priority ``
280
+ This grants or denies access by the first voter that does not abstain,
281
+ based on their service priority;
282
+
283
+ .. versionadded :: 5.1
284
+
285
+ The priority version strategy was introduced in Symfony 5.1.
286
+
278
287
279
288
In the above scenario, both voters should grant access in order to grant access
280
289
to the user to read the post. In this case, the default strategy is no longer
0 commit comments