Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- security:
- always_authenticate_before_granting: true
- encoders:
- App\Entity\User:
- algorithm: auto
- # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
- providers:
- in_memory: { memory: ~ }
- # used to reload user from session & other features (e.g. switch_user)
- in_database:
- entity:
- class: App\Entity\User
- property: email
- firewalls:
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
- main:
- anonymous: true
- provider: in_database
- form_login:
- login_path: account_login
- check_path: account_login
- default_target_path: home
- logout:
- path: account_logout
- target: account_login
- # activate different ways to authenticate
- # https://symfony.com/doc/current/security.html#firewalls-authentication
- # https://symfony.com/doc/current/security/impersonating_user.html
- # switch_user: true
- # Easy way to control access for large sections of your site
- # Note: Only the *first* access control that matches will be used
- access_control:
- - {path : /login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- - {path : /register, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: /requete, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/reset, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/, roles: ROLE_USER }
- - { path: ^/chef-service, roles: ROLE_CHEF_SERVICE }
- - { path: ^/validateur, roles: [ROLE_VALIDATEUR, ROLE_SUPPLEANT] }
- - { path: ^/super-validateur, roles: ROLE_SUPER_VALIDATEUR }
- - { path: ^/rh, roles: ROLE_RH }
- - { path: ^/admin, roles: ROLE_ADMIN }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement