You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 line
1.4KB

  1. security:
  2. encoders:
  3. App\Entity\User:
  4. algorithm: auto
  5. # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
  6. providers:
  7. # used to reload user from session & other features (e.g. switch_user)
  8. app_user_provider:
  9. entity:
  10. class: App\Entity\User
  11. property: email
  12. firewalls:
  13. dev:
  14. pattern: ^/(_(profiler|wdt)|css|images|js)/
  15. security: false
  16. main:
  17. anonymous: true
  18. lazy: true
  19. provider: app_user_provider
  20. guard:
  21. authenticators:
  22. - Lc\SovBundle\Authenticator\LoginFormAuthenticator
  23. logout:
  24. path: logout
  25. # where to redirect after logout
  26. # target: app_any_route
  27. # activate different ways to authenticate
  28. # https://symfony.com/doc/current/security.html#firewalls-authentication
  29. # https://symfony.com/doc/current/security/impersonating_user.html
  30. # switch_user: true
  31. # Easy way to control access for large sections of your site
  32. # Note: Only the *first* access control that matches will be used
  33. access_control:
  34. - { path: ^/manager, roles: [ROLE_ADMIN, ROLE_SUPER_ADMIN] }
  35. - { path: ^/admin, roles: [ROLE_ADMIN, ROLE_SUPER_ADMIN] }
  36. - { path: ^/profile, roles: ROLE_USER }