Commit cc184bce authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Merge branch 'hotfix_filtre_pour_dir_et_doct'

parents 7d3bb0e3 157d6cbb
Loading
Loading
Loading
Loading
Loading
+9 −9
Changes for module/Application/src/Application/Service/These/TheseRechercheService.php: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -508,15 +508,15 @@ class TheseRechercheService

    private function fetchEtablissementsOptions()
    {
        $role = $this->getSelectedIdentityRole();

        $privilege = StructurePrivileges::STRUCTURE_CONSULTATION_TOUTES_STRUCTURES;
        $toutesStructuresAllowed = $this->authorizeService->isAllowed(StructurePrivileges::getResourceId($privilege));
        if ($role && !$toutesStructuresAllowed) {
            return [
                $this->optionify($role->getStructure()->getEtablissement())
            ];
        }
//        $role = $this->getSelectedIdentityRole();
//
//        $privilege = StructurePrivileges::STRUCTURE_CONSULTATION_TOUTES_STRUCTURES;
//        $toutesStructuresAllowed = $this->authorizeService->isAllowed(StructurePrivileges::getResourceId($privilege));
//        if ($role && !$toutesStructuresAllowed) {
//            return [
//                $this->optionify($role->getStructure()->getEtablissement())
//            ];
//        }

        $etablissements = $this->getEtablissementService()->getRepository()->findAllEtablissementsMembres();