Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

40 lines
1.3KB

  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. - App\Security\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: ^/admin, roles: [ROLE_ADMIN, ROLE_SUPER_ADMIN] }
  35. - { path: ^/profile, roles: ROLE_USER }