Loading module/Application/src/Application/Service/ElementPedagogiqueService.php +1 −1 Original line number Diff line number Diff line Loading @@ -281,7 +281,7 @@ where rang = 1 public function delete($entity, $softDelete = true) { if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ELEMENT_EDITION)) { throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cet enseignement.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cet enseignement.'); } foreach ($entity->getCheminPedagogique() as $cp) { Loading module/Application/src/Application/Service/EtapeService.php +4 −3 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\GroupeTypeFormationServiceAwareTrait; use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeFormationServiceAwareTrait; use BjyAuthorize\Exception\UnAuthorizedException; use Doctrine\ORM\QueryBuilder; use Application\Entity\Db\Etape; Loading Loading @@ -151,7 +152,7 @@ class EtapeService extends AbstractEntityService } if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ETAPE_EDITION)) { throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); } return parent::save($entity); Loading @@ -162,7 +163,7 @@ class EtapeService extends AbstractEntityService public function saveModulateurs(Etape $etape) { if (!$this->getAuthorize()->isAllowed($etape, Privileges::ODF_MODULATEURS_EDITION)) { throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); } $serviceElementModulateur = $this->getServiceElementModulateur(); Loading Loading @@ -192,7 +193,7 @@ class EtapeService extends AbstractEntityService public function delete($entity, $softDelete = true) { if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ETAPE_EDITION)) { throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cette formation.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cette formation.'); } return parent::delete($entity, $softDelete); Loading Loading
module/Application/src/Application/Service/ElementPedagogiqueService.php +1 −1 Original line number Diff line number Diff line Loading @@ -281,7 +281,7 @@ where rang = 1 public function delete($entity, $softDelete = true) { if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ELEMENT_EDITION)) { throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cet enseignement.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cet enseignement.'); } foreach ($entity->getCheminPedagogique() as $cp) { Loading
module/Application/src/Application/Service/EtapeService.php +4 −3 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\GroupeTypeFormationServiceAwareTrait; use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeFormationServiceAwareTrait; use BjyAuthorize\Exception\UnAuthorizedException; use Doctrine\ORM\QueryBuilder; use Application\Entity\Db\Etape; Loading Loading @@ -151,7 +152,7 @@ class EtapeService extends AbstractEntityService } if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ETAPE_EDITION)) { throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); } return parent::save($entity); Loading @@ -162,7 +163,7 @@ class EtapeService extends AbstractEntityService public function saveModulateurs(Etape $etape) { if (!$this->getAuthorize()->isAllowed($etape, Privileges::ODF_MODULATEURS_EDITION)) { throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); } $serviceElementModulateur = $this->getServiceElementModulateur(); Loading Loading @@ -192,7 +193,7 @@ class EtapeService extends AbstractEntityService public function delete($entity, $softDelete = true) { if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ETAPE_EDITION)) { throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cette formation.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cette formation.'); } return parent::delete($entity, $softDelete); Loading