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

La page de saisie des services était accessible en écrivant la bonne URL, même...

La page de saisie des services était accessible en écrivant la bonne URL, même si le workflow ne permettait pas d'arriver à cette étape.
parent bf9c13b8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
# OSE 13.0 ALPHA

## Correction de bugs

* La page de saisie des services était accessible en écrivant la bonne URL, même si le workflow ne permettait pas d'arriver à cette étape.

# OSE 12.2

## Correction de bug
+19 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ use Application\Entity\Db\WfEtape;
use Application\Provider\Privilege\Privileges;
use Application\Service\Traits\CampagneSaisieServiceAwareTrait;
use Application\Service\Traits\ContextServiceAwareTrait;
use Application\Service\Traits\TypeVolumeHoraireServiceAwareTrait;
use Application\Service\Traits\ValidationServiceAwareTrait;
use Application\Service\Traits\WorkflowServiceAwareTrait;
use UnicaenAuth\Assertion\AbstractAssertion;
@@ -30,6 +31,7 @@ class ServiceAssertion extends AbstractAssertion
    use ContextServiceAwareTrait;
    use CampagneSaisieServiceAwareTrait;
    use ValidationServiceAwareTrait;
    use TypeVolumeHoraireServiceAwareTrait;



@@ -176,6 +178,8 @@ class ServiceAssertion extends AbstractAssertion
                return $this->assertImportAgenda($role);

            break;
            case 'Application\Controller\Intervenant.services':
                return $this->assertPageServices($role, $intervenant);
        }

        return true;
@@ -183,6 +187,21 @@ class ServiceAssertion extends AbstractAssertion



    protected function assertPageServices(Role $role, Intervenant $intervenant)
    {
        $typeVolumehoraireCode = $this->getMvcEvent()->getRouteMatch()->getParam('type-volume-horaire-code');
        $typeVolumeHoraire     = $this->getServiceTypeVolumeHoraire()->getByCode($typeVolumehoraireCode);

        $wfEtape = $this->getWorkflowEtape($typeVolumeHoraire, 'saisie');

        return $this->asserts([
            $this->assertIntervenant($role, $intervenant),
            $this->assertEtapeAtteignable($wfEtape, $intervenant),
        ]);
    }



    protected function assertEnseignements(Role $role)
    {
        return $this->asserts([