first commit after reset
[mixstore.git] / app / config / security.yml
1 security:
2 encoders:
3 FOS\UserBundle\Model\UserInterface: sha512
4
5 role_hierarchy:
6 ROLE_ADMIN: ROLE_USER
7 ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
8
9 providers:
10 fos_userbundle:
11 id: fos_user.user_provider.username
12
13 firewalls:
14 main:
15 pattern: ^/
16 form_login:
17 provider: fos_userbundle
18 csrf_provider: form.csrf_provider
19 login_path: fos_user_security_login
20 check_path: fos_user_security_check
21 #http://fr.openclassrooms.com/forum/sujet/redirection-after-login-fosuser-96549
22 always_use_default_target_path: true
23 default_target_path: /board
24 logout:
25 path: /security/logout
26 target: /
27 anonymous: true
28 dev:
29 pattern: ^/(_(profiler|wdt)|css|images|js)/
30 security: false
31
32 access_control:
33 - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
34 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
35 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
36 - { path: ^/admin/, role: ROLE_ADMIN }
37 #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }