Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- security:
- encoders:
- Symfony\Component\Security\Core\User\User: plaintext
- role_hierarchy:
- ROLE_ADMIN: ROLE_USER
- ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
- providers:
- in_memory:
- users:
- user: { password: userpass, roles: [ 'ROLE_USER' ] }
- admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
- fos_userbundle:
- id: fos_user.user_manager
- firewalls:
- main:
- form_login:
- provider: fos_userbundle
- profiler:
- pattern: ^/_profiler
- security: false
- wdt:
- pattern: ^/_wdt
- security: false
- main:
- pattern: .*
- form_login:
- provider: fos_userbundle
- login_path: /login
- use_forward: false
- check_path: /login_check
- failure_path: null
- logout: true
- anonymous: true
- access_control:
- # The WDT has to be allowed to anonymous users to avoid requiring the login with the AJAX request
- - { path: ^/_wdt/, role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/_profiler/, role: IS_AUTHENTICATED_ANONYMOUSLY }
- # AsseticBundle paths used when using the controller for assets
- - { path: ^/js/, role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/css/, role: IS_AUTHENTICATED_ANONYMOUSLY }
- # URL of FOSUserBundle which need to be available to anonymous users
- - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- # Secured part of the site
- # This config requires being logged for the whole site and having the admin role for the admin part.
- # Change these rules to adapt them to your needs
- - { path: ^/admin/, role: ROLE_ADMIN }
- - { path: ^/.*, role: ROLE_USER }
- role_hierarchy:
- ROLE_ADMIN: ROLE_USER
- ROLE_SUPER_ADMIN: ROLE_ADMIN
Add Comment
Please, Sign In to add comment