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