Commit d03f2d4d authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Merge remote-tracking branch 'origin/b23' into b23

parents 4855823a 72a45b55
Loading
Loading
Loading
Loading
+5 −5
Changes for module/Application/src/Controller/DroitsController.php: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ class DroitsController extends AbstractController
            if ($form->isValid()) {
                try {
                    $this->getServiceRole()->save($role);
                    $this->doctrineCache->delete(RoleProvider::class . '/affectations');
                    $this->doctrineCache->delete(RoleProvider::class . '_affectations');
                    $form->get('id')->setValue($role->getId()); // transmet le nouvel ID
                } catch (\Exception $e) {
                    $errors[] = $this->translate($e);
@@ -115,7 +115,7 @@ class DroitsController extends AbstractController
        $title = "Suppression du rôle";
        $form  = $this->makeFormSupprimer(function () use ($role) {
            $this->getServiceRole()->delete($role);
            $this->doctrineCache->delete(RoleProvider::class . '/affectations');
            $this->doctrineCache->delete(RoleProvider::class . '_affectations');
            $this->getSessionContainer()->offsetUnset('privileges' . $this->getServiceContext()->getAnnee()->getId());
        });

@@ -164,7 +164,7 @@ class DroitsController extends AbstractController
                if ($role) $this->roleRemovePrivilege($role, $privilege);
            break;
        }
        $this->doctrineCache->delete(RoleProvider::class . '/affectations');
        $this->doctrineCache->delete(RoleProvider::class . '_affectations');

        return compact('role', 'privilege');
    }
@@ -250,7 +250,7 @@ class DroitsController extends AbstractController
                }
            }
        }
        $this->doctrineCache->delete(RoleProvider::class . '/affectations');
        $this->doctrineCache->delete(RoleProvider::class . '_affectations');

        return compact('form', 'title', 'errors');
    }
@@ -266,7 +266,7 @@ class DroitsController extends AbstractController
        $form = $this->makeFormSupprimer(function () use ($affectation) {
            $this->getServiceAffectation()->delete($affectation);
        });
        $this->doctrineCache->delete(RoleProvider::class . '/affectations');
        $this->doctrineCache->delete(RoleProvider::class . '_affectations');

        return compact('affectation', 'title', 'form');
    }
+1 −1
Changes for module/Application/src/Provider/Role/RoleProvider.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface
            r.histoDestruction IS NULL'
        )->setParameter('utilisateur', $utilisateur);
        $query->useResultCache(true);
        $query->setResultCacheId(__CLASS__ . '/affectations');
        $query->setResultCacheId(str_replace('\\', '_', __CLASS__) . '_affectations');


        $result          = $query->getResult();