From 5a98a00e7d88a4ab0e68d68abf1eee8842cb1b30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 14 Nov 2024 07:34:37 +0100 Subject: [PATCH 1/1] Replace hardcoded role by configurable key --- Controller/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/UserController.php b/Controller/UserController.php index 672f933..22ce0f8 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -155,7 +155,7 @@ class UserController extends AbstractController { //Set civility default 'civility_default' => $this->doctrine->getRepository($this->config['class']['civility'])->findOneByTitle($this->config['default']['civility']), //Disable mail - 'mail' => $this->checker->isGranted('ROLE_ADMIN'), + 'mail' => $this->checker->isGranted('ROLE_'.strtoupper($this->config['default']['admin'])), //Disable password 'password' => false, //Set method -- 2.41.1