security.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  3. <parameters>
  4. <parameter key="sonata.admin.security.handler.noop.class">Sonata\AdminBundle\Security\Handler\NoopSecurityHandler</parameter>
  5. <parameter key="sonata.admin.security.handler.role.class">Sonata\AdminBundle\Security\Handler\RoleSecurityHandler</parameter>
  6. <parameter key="sonata.admin.security.handler.acl.class">Sonata\AdminBundle\Security\Handler\AclSecurityHandler</parameter>
  7. <parameter key="sonata.admin.security.mask.builder.class">Sonata\AdminBundle\Security\Acl\Permission\MaskBuilder</parameter>
  8. <parameter key="sonata.admin.manipulator.acl.admin.class">Sonata\AdminBundle\Util\AdminAclManipulator</parameter>
  9. <parameter key="sonata.admin.object.manipulator.acl.admin.class">Sonata\AdminBundle\Util\AdminObjectAclManipulator</parameter>
  10. </parameters>
  11. <services>
  12. <service id="sonata.admin.security.handler.noop" class="%sonata.admin.security.handler.noop.class%" public="false"/>
  13. <service id="sonata.admin.security.handler.role" class="%sonata.admin.security.handler.role.class%" public="false">
  14. <argument/>
  15. <!-- security.authorization_checker or security.context for Symfony <2.6 -->
  16. <argument type="collection">
  17. <argument>ROLE_SUPER_ADMIN</argument>
  18. </argument>
  19. </service>
  20. <service id="sonata.admin.security.handler.acl" class="%sonata.admin.security.handler.acl.class%" public="false">
  21. <argument/>
  22. <!-- security.token_storage or security.context for Symfony <2.6 -->
  23. <argument/>
  24. <!-- security.authorization_checker or security.context for Symfony <2.6 -->
  25. <argument type="service" id="security.acl.provider" on-invalid="null"/>
  26. <argument>%sonata.admin.security.mask.builder.class%</argument>
  27. <argument type="collection">
  28. <argument>ROLE_SUPER_ADMIN</argument>
  29. </argument>
  30. <call method="setAdminPermissions">
  31. <argument>%sonata.admin.configuration.security.admin_permissions%</argument>
  32. </call>
  33. <call method="setObjectPermissions">
  34. <argument>%sonata.admin.configuration.security.object_permissions%</argument>
  35. </call>
  36. </service>
  37. <service id="sonata.admin.manipulator.acl.admin" class="%sonata.admin.manipulator.acl.admin.class%">
  38. <argument>%sonata.admin.security.mask.builder.class%</argument>
  39. </service>
  40. <service id="sonata.admin.object.manipulator.acl.admin" class="%sonata.admin.object.manipulator.acl.admin.class%">
  41. <argument type="service" id="form.factory"/>
  42. <argument>%sonata.admin.security.mask.builder.class%</argument>
  43. </service>
  44. </services>
  45. </container>