@@ -313,3 +313,49 @@ security configuration:
313313 'allow_if_all_abstain' => false,
314314 ],
315315 ]);
316+
317+ Custom Access Decision Strategy
318+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
319+
320+ If none of the built-in strategies fits your use case, define the ``service ``
321+ option to use a custom service as the Access Decision Manager (your service
322+ must implement the:class: `Symfony\\ Component\\ Security\\ Core\\ Authorization\\ AccessDecisionManagerInterface `):
323+
324+ ..configuration-block ::
325+
326+ ..code-block ::yaml
327+
328+ # app/config/security.yml
329+ security :
330+ access_decision_manager :
331+ service :App\Security\MyCustomAccessDecisionManager
332+ # ...
333+
334+ ..code-block ::xml
335+
336+ <!-- app/config/security.xml-->
337+ <?xml version =" 1.0" encoding =" UTF-8" ?>
338+ <srv : container xmlns =" http://symfony.com/schema/dic/security"
339+ xmlns : srv =" http://symfony.com/schema/dic/services"
340+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
341+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
342+ https://symfony.com/schema/dic/services/services-1.0.xsd"
343+ >
344+
345+ <config >
346+ <access-decision-manager
347+ service =" App\Security\MyCustomAccessDecisionManager" />
348+ </config >
349+ </srv : container >
350+
351+ ..code-block ::php
352+
353+ // app/config/security.php
354+ use App\Security\MyCustomAccessDecisionManager;
355+
356+ $container->loadFromExtension('security', [
357+ 'access_decision_manager' => [
358+ 'service' => MyCustomAccessDecisionManager::class,
359+ // ...
360+ ],
361+ ]);