Commit ef090d6f authored by Bertrand Gauthier's avatar Bertrand Gauthier Committed by Jean-Philippe Metivier
Browse files

Abandon de la nature de fichier 'divers' au profit de 'commun'.

parent e99e7940
Loading
Loading
Loading
Loading
+0 −1
Changes for module/Application/src/Application/Entity/Db/NatureFichier.php: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ class NatureFichier
    const CODE_CONV_MISE_EN_LIGNE = 'CONV_MISE_EN_LIGNE';
    const CODE_AVENANT_CONV_MISE_EN_LIGNE = 'AVENANT_CONV_MISE_EN_LIGNE';
    const CODE_COMMUNS = 'COMMUNS';
    const CODE_DIVERS = 'DIVERS';

    const CODE_JUSTIFICATIF_HDR = 'JUSTIFICATIF_HDR';
    const CODE_JUSTIFICATIF_EMERITAT = 'JUSTIFICATIF_EMERITAT';
+0 −13
Changes for module/Application/src/Application/Provider/Privilege/FichierPrivileges.php: 0 added lines, 13 removed lines.
Original line number Diff line number Diff line
@@ -14,12 +14,6 @@ use UnicaenAuth\Provider\Privilege\Privileges;
 */
class FichierPrivileges extends Privileges
{
    /**
     * Dépôt de fichiers dits "divers" (ex: fichiers pour les pages d'informations).
     */
    const FICHIER_DIVERS_TELEVERSER = 'fichier-divers-televerser';
    const FICHIER_DIVERS_TELECHARGER = 'fichier-divers-telecharger';

    /**
     * Dépôt de fichiers "communs" (ex: modèle d'avenant à la convention de MEL).
     */
@@ -54,10 +48,6 @@ class FichierPrivileges extends Privileges
                    ThesePrivileges::THESE_DEPOT_VERSION_CORRIGEE :
                    ThesePrivileges::THESE_DEPOT_VERSION_INITIALE;

            case NatureFichier::CODE_DIVERS:
                //
                return self::FICHIER_DIVERS_TELEVERSER;

            case NatureFichier::CODE_COMMUNS:
                //
                return self::FICHIER_COMMUN_TELEVERSER;
@@ -92,9 +82,6 @@ class FichierPrivileges extends Privileges
            case NatureFichier::CODE_THESE_PDF:
            case NatureFichier::CODE_FICHIER_NON_PDF:
                return ThesePrivileges::THESE_TELECHARGEMENT_FICHIER;
            case NatureFichier::CODE_DIVERS:
                //
                return self::FICHIER_DIVERS_TELECHARGER;

            case NatureFichier::CODE_COMMUNS:
                //
+1 −1
Changes for module/Application/src/Application/Service/Fichier/FichierService.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ class FichierService extends BaseService
        }
        if (!$nature instanceof NatureFichier) {
            $nature = $this->natureFichierService->getRepository()->findOneBy(
                ['code' => $nature ?: NatureFichier::CODE_DIVERS]
                ['code' => $nature ?: NatureFichier::CODE_COMMUNS]
            );
        }

+1 −1
Changes for module/Information/src/Information/Controller/FichierController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ class FichierController extends AbstractActionController

                $fichiers = $this->fichierService->createFichiersFromUpload(
                    $uploadData = ['files' => $file['chemin']],
                    NatureFichier::CODE_DIVERS,
                    NatureFichier::CODE_COMMUNS,
                    VersionFichier::CODE_ORIG
                );
                $this->fichierService->saveFichiers($fichiers);
+1 −1
Changes for module/Information/src/Information/Service/InformationFichierService.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ class InformationFichierService
            ->addSelect('createur')
            ->join('fichier.histoCreateur', 'createur')
            ->join('fichier.nature', 'nat', Expr\Join::WITH, 'nat.code = :code')
            ->setParameter('code', NatureFichier::CODE_DIVERS)
            ->setParameter('code', NatureFichier::CODE_COMMUNS)
            ->orderBy('fichier.id');

        return $qb->getQuery()->getResult();
Loading