Commit b7568aba authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Pouvoir refuser une candidature même si l'étudiant n'a pas renseigné à 100%...

Pouvoir refuser une candidature même si l'étudiant n'a pas renseigné à 100% ses données persos et ses pièces justificatives (#62327)
parent ef579a05
Loading
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -90,8 +90,9 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa
            case $entity instanceof Candidature:
                switch ($privilege) {
                    case Privileges::MISSION_CANDIDATURE_VALIDER:
                    case Privileges::MISSION_CANDIDATURE_REFUSER:
                        return $this->assertCandidatureValider($role, $entity);
                    case Privileges::MISSION_CANDIDATURE_REFUSER:
                        return $this->assertCandidatureRefuser($role, $entity);
                }
            break;
        }
@@ -288,4 +289,12 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa
        ]);
    }



    protected function assertCandidatureRefuser(Role $role, Candidature $candidature): bool
    {
        $structureOffre = $candidature->getOffre()->getStructure();
        return $this->assertStructure($role, $structureOffre);
    }

}
 No newline at end of file