Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jms_security_extra:
- secure_all_services: false
- expressions: true
- security:
- encoders:
- Symfony\Component\Security\Core\User\User: plaintext
- OSC\UserBundle\Entity\User: sha512
- role_hierarchy:
- ROLE_COACH: [ROLE_USER]
- ROLE_EDITOR: [ROLE_USER]
- ROLE_PREMIUM_COACH : [ROLE_COACH]
- ROLE_ADMIN: [ROLE_EDITOR, ROLE_PREMIUM_COACH]
- ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
- providers:
- in_memory:
- memory:
- users:
- user: { password: userpass, roles: [ 'ROLE_USER' ] }
- admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
- fos_userbundle:
- id: fos_user.user_manager
- firewalls:
- # -> end custom configuration
- dashboard:
- pattern: /OSC/dashboard(.*)
- form_login:
- provider: fos_userbundle
- login_path: /login
- use_forward: true
- check_path: /login_check
- failure_path: null
- use_referer: true
- logout: true
- anonymous: false
- # defaut login area for standard users
- # defaut login area for standard users
- main:
- pattern: .*
- form_login:
- provider: fos_userbundle
- csrf_provider: form.csrf_provider
- login_path: /login
- use_forward: true
- check_path: /login_check
- failure_path: null
- use_referer: true
- logout: true
- anonymous: true
- access_control:
- # URL of FOSUserBundle which need to be available to anonymous users
- - { path: ^/_wdt, role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/_profiler, role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/OSC/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: ^/.*, role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/OSC/dashboard, role: ROLE_USER}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement