From 022156c06a2e6b9ea0b1bac26a3f38036db68ad9 Mon Sep 17 00:00:00 2001 From: Zakarya BENJABALLAH Date: Thu, 9 Feb 2023 10:27:55 +0100 Subject: [PATCH] Ajout role apprenti --- config/packages/security.yaml | 1 + src/Entity/User.php | 1 + 2 files changed, 2 insertions(+) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 507945f..8196f0a 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -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)/ diff --git a/src/Entity/User.php b/src/Entity/User.php index 98739b6..e56617c 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -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); }