Commit b37da125 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Blocage fort de l'accès à la gestion des agréments par les intervenants

parent 441ca2c0
Loading
Loading
Loading
Loading
+5
Changes for module/Application/src/Assertion/AgrementAssertion.php: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -153,6 +153,11 @@ class AgrementAssertion extends AbstractAssertion
        }

        if (!$role instanceof Role) return false;

        if ($role->getIntervenant() && str_starts_with($page['route'], 'gestion/')) {
            return false;
        }

        if ($privilege && !$role->hasPrivilege($privilege)) return false;
        if ($wfEtape && $intervenant && !$this->isAllowed(WorkflowResource::create($wfEtape, $intervenant))) return false;