Ajout role apprenti

This commit is contained in:
Zakarya BENJABALLAH 2023-02-09 10:27:55 +01:00
parent 6f208133e3
commit 022156c06a
2 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ security:
property: email
role_hierarchy:
ROLE_INSTRUCTOR: ROLE_USER
ROLE_APPRENTI: ROLE_USER
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/

View File

@ -85,6 +85,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
$roles[] = 'ROLE_INSTRUCTOR';
$roles[] = 'ROLE_APPRENTI';
return array_unique($roles);
}