Commit b7399b80 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

correction de l'ajout de rôle si role deja present dans l'ajout de gestionnaire de structure

parent 1177baee
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Application/src/Application/Controller/StructureController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ class StructureController extends AbstractActionController {
            if ($gestionnaire !== null AND $structure !== null) {
                if (!$gestionnaire->hasRole(RoleConstant::GESTIONNAIRE)) {
                    $gestionnaireRole = $this->getRoleService()->getRoleByCode(RoleConstant::GESTIONNAIRE);
                    $gestionnaire->addRole($gestionnaireRole);
                    if (!$gestionnaire->hasRole($gestionnaireRole)) $gestionnaire->addRole($gestionnaireRole);
                    $this->getUserService()->update($gestionnaire);
                }
                $this->getStructureService()->addGestionnaire($structure, $gestionnaire);
+4 −4

File changed.

Contains only whitespace changes.