Loading module/Contrat/src/Assertion/ContratAssertion.php +16 −9 Original line number Diff line number Diff line Loading @@ -312,14 +312,21 @@ class ContratAssertion extends AbstractAssertion case ContratController::class . '.supprimerProcessSignature': case ContratController::class . '.rafraichirProcessSignature': $intervenant = $this->getParam(Intervenant::class); if (!$intervenant) { $contrat = $this->getParam(Contrat::class); if ($contrat) { $intervenant = $contrat->getIntervenant(); } } if ($intervenant) { $feuilleDeRoute = $this->getServiceWorkflow()->getFeuilleDeRoute($intervenant); $wfEtape = $feuilleDeRoute->get(WorkflowEtape::CONTRAT); if ($wfEtape && $wfEtape->isAllowed()) return true; }else{ throw new UnAuthorizedException('Action de contrôleur ' . $controller . ':' . $action . ' non autorisée'); } default: throw new UnAuthorizedException('Action de contrôleur ' . $controller . ':' . $action . ' non traitée'); throw new UnAuthorizedException('Action de contrôleur ' . $controller . ':' . $action . ' non autorisée'); default: throw new UnAuthorizedException('Action de contrôleur ' . $controller . ':' . $action . ' non traitée'); } } } No newline at end of file Loading
module/Contrat/src/Assertion/ContratAssertion.php +16 −9 Original line number Diff line number Diff line Loading @@ -312,14 +312,21 @@ class ContratAssertion extends AbstractAssertion case ContratController::class . '.supprimerProcessSignature': case ContratController::class . '.rafraichirProcessSignature': $intervenant = $this->getParam(Intervenant::class); if (!$intervenant) { $contrat = $this->getParam(Contrat::class); if ($contrat) { $intervenant = $contrat->getIntervenant(); } } if ($intervenant) { $feuilleDeRoute = $this->getServiceWorkflow()->getFeuilleDeRoute($intervenant); $wfEtape = $feuilleDeRoute->get(WorkflowEtape::CONTRAT); if ($wfEtape && $wfEtape->isAllowed()) return true; }else{ throw new UnAuthorizedException('Action de contrôleur ' . $controller . ':' . $action . ' non autorisée'); } default: throw new UnAuthorizedException('Action de contrôleur ' . $controller . ':' . $action . ' non traitée'); throw new UnAuthorizedException('Action de contrôleur ' . $controller . ':' . $action . ' non autorisée'); default: throw new UnAuthorizedException('Action de contrôleur ' . $controller . ':' . $action . ' non traitée'); } } } No newline at end of file