Loading CHANGELOG.md +1 Changes for CHANGELOG.md: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ author: Laurent Lécluse - DSI - Unicaen * Un bug modifiant les paramètres globaux qui avaient été configurés a été résolu * La duplication de statuts refonctionne * Lors de la création d'un nouveau statut, l'octroi de privilèges ne plante plus * La suppression de rôle fonctionne de nouveau correctement # OSE 9.0.1-zf2 et 9.0.1-zf3 Loading module/Application/src/Application/Controller/DroitsController.php +3 Changes for module/Application/src/Application/Controller/DroitsController.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -106,6 +106,9 @@ class DroitsController extends AbstractController $title = "Suppression du rôle"; $form = $this->makeFormSupprimer( function() use ($role){ $this->getServiceRole()->delete($role); $this->getCacheFilesystem()->delete(RoleProvider::class.'/affectations'); $cc = $this->getCacheContainer(PrivilegeService::class); unset($cc->privilegesRoles); } ); return compact('role', 'title', 'form'); Loading module/Application/src/Application/Provider/Identity/IdentityProvider.php +8 −1 Changes for module/Application/src/Application/Provider/Identity/IdentityProvider.php: 8 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -60,12 +60,19 @@ class IdentityProvider implements ChainableProvider, IdentityProviderInterface if ($utilisateur = $this->getServiceContext()->getUtilisateur()) { foreach ($utilisateur->getAffectation() as $affectation) { /* @var $affectation Affectation */ $roleId = $affectation->getRole()->getCode(); $role = $affectation->getRole(); try { $roleId = $role->getCode(); if ($role->estNonHistorise()) { if ($structure = $affectation->getStructure()) { $roleId .= '-' . $structure->getSourceCode(); } $this->identityRoles[] = $roleId; } }catch(\Exception $e){ // on ignore les affectations dont les rôles ont été supprimés } } } /** Loading module/Application/src/Application/Provider/Role/RoleProvider.php +1 −1 Changes for module/Application/src/Application/Provider/Role/RoleProvider.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface /* @var $affectation Affectation */ if ($structure = $affectation->getStructure()) { $affRoleId = $roleId . '-' . $structure->getSourceCode(); if (!isset($roles[$affRoleId])) { if (!isset($roles[$affRoleId]) && $dbRole->estNonHistorise()) { $affRoleLibelle = $dbRole->getLibelle() . ' (' . $structure->getLibelleCourt() . ')'; $affRole = new \Application\Acl\Role($affRoleId, $roleId, $affRoleLibelle); if (isset($rolesPrivileges[$roleId])) { Loading Loading
CHANGELOG.md +1 Changes for CHANGELOG.md: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ author: Laurent Lécluse - DSI - Unicaen * Un bug modifiant les paramètres globaux qui avaient été configurés a été résolu * La duplication de statuts refonctionne * Lors de la création d'un nouveau statut, l'octroi de privilèges ne plante plus * La suppression de rôle fonctionne de nouveau correctement # OSE 9.0.1-zf2 et 9.0.1-zf3 Loading
module/Application/src/Application/Controller/DroitsController.php +3 Changes for module/Application/src/Application/Controller/DroitsController.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -106,6 +106,9 @@ class DroitsController extends AbstractController $title = "Suppression du rôle"; $form = $this->makeFormSupprimer( function() use ($role){ $this->getServiceRole()->delete($role); $this->getCacheFilesystem()->delete(RoleProvider::class.'/affectations'); $cc = $this->getCacheContainer(PrivilegeService::class); unset($cc->privilegesRoles); } ); return compact('role', 'title', 'form'); Loading
module/Application/src/Application/Provider/Identity/IdentityProvider.php +8 −1 Changes for module/Application/src/Application/Provider/Identity/IdentityProvider.php: 8 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -60,12 +60,19 @@ class IdentityProvider implements ChainableProvider, IdentityProviderInterface if ($utilisateur = $this->getServiceContext()->getUtilisateur()) { foreach ($utilisateur->getAffectation() as $affectation) { /* @var $affectation Affectation */ $roleId = $affectation->getRole()->getCode(); $role = $affectation->getRole(); try { $roleId = $role->getCode(); if ($role->estNonHistorise()) { if ($structure = $affectation->getStructure()) { $roleId .= '-' . $structure->getSourceCode(); } $this->identityRoles[] = $roleId; } }catch(\Exception $e){ // on ignore les affectations dont les rôles ont été supprimés } } } /** Loading
module/Application/src/Application/Provider/Role/RoleProvider.php +1 −1 Changes for module/Application/src/Application/Provider/Role/RoleProvider.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface /* @var $affectation Affectation */ if ($structure = $affectation->getStructure()) { $affRoleId = $roleId . '-' . $structure->getSourceCode(); if (!isset($roles[$affRoleId])) { if (!isset($roles[$affRoleId]) && $dbRole->estNonHistorise()) { $affRoleLibelle = $dbRole->getLibelle() . ' (' . $structure->getLibelleCourt() . ')'; $affRole = new \Application\Acl\Role($affRoleId, $roleId, $affRoleLibelle); if (isset($rolesPrivileges[$roleId])) { Loading