Rôles, tableau de bord et tests unitaires
This commit is contained in:
parent
f508a2fcb5
commit
1799035236
51 changed files with 4350 additions and 0 deletions
55
config/packages/security.yaml
Normal file
55
config/packages/security.yaml
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
security:
|
||||
password_hashers:
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||
|
||||
providers:
|
||||
app_user_provider:
|
||||
entity:
|
||||
class: App\Entity\User
|
||||
property: email
|
||||
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_profiler|_wdt|assets|build)/
|
||||
security: false
|
||||
main:
|
||||
lazy: true
|
||||
provider: app_user_provider
|
||||
user_checker: App\Security\UserChecker
|
||||
form_login:
|
||||
login_path: app_login
|
||||
check_path: app_login
|
||||
enable_csrf: true
|
||||
default_target_path: /
|
||||
logout:
|
||||
path: app_logout
|
||||
target: app_login
|
||||
remember_me:
|
||||
secret: '%kernel.secret%'
|
||||
lifetime: 604800
|
||||
access_denied_handler: App\Security\AccessDeniedHandler
|
||||
|
||||
access_control:
|
||||
- { path: ^/login, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/logout, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/register, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/forgot-password, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/reset-password, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/profile, roles: ROLE_OPERATOR }
|
||||
- { path: ^/pending, roles: ROLE_USER }
|
||||
- { path: ^/$, roles: ROLE_USER }
|
||||
- { path: ^/admin, roles: ROLE_ADMIN }
|
||||
- { path: ^/, roles: ROLE_OPERATOR }
|
||||
|
||||
role_hierarchy:
|
||||
ROLE_OPERATOR: ROLE_USER
|
||||
ROLE_ADMIN: ROLE_OPERATOR
|
||||
|
||||
when@test:
|
||||
security:
|
||||
password_hashers:
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
|
||||
algorithm: auto
|
||||
cost: 4
|
||||
time_cost: 3
|
||||
memory_cost: 10
|
||||
Loading…
Add table
Add a link
Reference in a new issue