]> Raphaël G. Git Repositories - userbundle/commitdiff
Replace hardcoded role by configurable key
authorRaphaël Gertz <git@rapsys.eu>
Thu, 14 Nov 2024 06:34:37 +0000 (07:34 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Thu, 14 Nov 2024 06:34:37 +0000 (07:34 +0100)
Controller/UserController.php

index 672f93392459b8b262ffe2bda85be72e50e81adb..22ce0f8052f5d9166f057379237fdd4bcdf7971a 100644 (file)
@@ -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
                        //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
                        //Disable password
                        'password' => false,
                        //Set method