caisse-bliss/app/config/security.yml

43 lines
1.5 KiB
YAML
Raw Normal View History

2018-05-08 11:27:06 +02:00
# To get started with security, check out the documentation:# To get started with security, check out the documentation:
2018-04-04 16:25:25 +02:00
# https://symfony.com/doc/current/security.html
security:
2019-07-01 21:16:04 +02:00
encoders:
FOS\UserBundle\Model\UserInterface: bcrypt
# https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
providers:
fos_userbundle:
id: fos_user.user_provider.username
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
# https://symfony.com/doc/current/security/form_login_setup.html
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
http_basic: ~
main:
pattern: ^/
anonymous: ~
logout: true
logout_on_user_change: true
form_login:
provider: fos_userbundle
csrf_token_generator: security.csrf.token_manager
default_target_path: dashboard
login_path: fos_user_security_login
check_path: /login_check
2018-04-25 14:47:31 +02:00
2019-07-01 21:16:04 +02:00
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: ROLE_ADMIN
access_control:
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/dashboard$, role: IS_AUTHENTICATED_REMEMBERED }
2019-07-05 14:09:25 +02:00
- { path: ^/history$, role: IS_AUTHENTICATED_REMEMBERED }
2019-07-01 21:16:04 +02:00
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
2019-07-01 22:03:36 +02:00
- { path: ^/logged, role: IS_AUTHENTICATED_REMEMBERED }
2019-07-01 21:16:04 +02:00
- { path: ^/admin/, role: ROLE_ADMIN }
2018-04-04 16:25:25 +02:00