Commit fb59d505 authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Contrôle pour prévenir les doubles-validations de données personnelles

parent 44fbb7b6
......@@ -173,6 +173,10 @@ class DossierController extends AbstractController
$role = $this->getServiceContext()->getSelectedIdentityRole();
$intervenant = $role->getIntervenant() ?: $this->getEvent()->getParam('intervenant');
$dossier = $this->getServiceDossier()->getByIntervenant($intervenant);
$validation = $this->getServiceDossier()->getValidation($intervenant);
if ($validation){
throw new \Exception('Ce dossier a déjà été validé par '.$validation->getHistoCreateur().' le '.$validation->getHistoCreation()->format(Constants::DATE_FORMAT));
}
try {
$this->getServiceValidation()->validerDossier($dossier);
$this->updateTableauxBord($intervenant, true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment