Commit 826836f1 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'release_3.0.13' into release_4.0.0

parents de959dc7 b97ce0a3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -12,6 +12,13 @@ Journal des modifications
- [FIX] Activation de la mise en cache de la config lorsque le mode development est désactivé.
- [FIX] Lancement de la synchro des thèses pour prendre en compte la création/modification/suppression de substitution de structures.

3.0.13
------
- Ajout des unités de recherche fermées dans le filtre des thèses
- [FIX] correction du bug lié au typage de retour trop strict de l'entité Structure
- Mise en place de la déclaration de non plagiat dans la proposition de soutenance
- [FIX] Plantage lors de la création/modification/suppression d'une substitution de structure ("Synchro introuvable avec ce nom : these")

3.0.12
------
- Le bouton d'impression du document pour signature du président reste visible même après validation de l'ED.
+84 −0
Original line number Diff line number Diff line
# Version 3.0.12

## 1. Sur le serveur d'application

- Placez-vous dans le répertoire de l'application puis lancez la commande suivante
  pour installer la nouvelle version :

```bash
git fetch --tags && git checkout --force 3.0.12 && bash ./install.sh
```

- Selon le moteur PHP que vous avez installé, rechargez le service, exemple :
    - php7.3-fpm         : `service php7.3-fpm reload`
    - apache2-mod-php7.3 : `service apache2 reload`

## 2. Dans la base de données

- Ajout des nouvelles validations liées aux déclarations de non plagiat
```SQL
insert into type_validation (code, libelle) VALUES ('DOCTORANT_DECLARATION_HONNEUR_NON_PLAGIAT', 'Déclaration sur l''honneur de non plagiat du doctorant');
insert into type_validation (code, libelle) VALUES ('DOCTORANT_REFUS_HONNEUR_NON_PLAGIAT', 'Refus de la déclaration sur l''honneur de non plagiat du doctorant');
```

- Ajout des privilèges associés aux déclarations de non plagiat
```SQL
insert into PRIVILEGE(ID, CATEGORIE_ID, CODE, LIBELLE, ORDRE)
with d(ordre, code, lib) as (
    select 1001, 'declaration-honneur-valider', 'Valider/Refuser la déclaration sur l''honneur de non plagiat' union
    select 1002, 'declaration-honneur-revoquer', 'Revoquer la déclaration sur l''honneur de non plagiat'
)
select privilege_id_seq.nextval, cp.id, d.code, d.lib, d.ordre
from d
join CATEGORIE_PRIVILEGE cp on cp.CODE = 'soutenance'
;
```

- Attribution minimale des nouveaux privileges
```SQL
-- declaration-honneur-valider doit être accorder aux doctorants
INSERT INTO PROFIL_PRIVILEGE (PRIVILEGE_ID, PROFIL_ID)
with data(categ, priv) as (
  select 'soutenance', 'declaration-honneur-valider'
)
select p.id as PRIVILEGE_ID, profil.id as PROFIL_ID
from data
       join PROFIL on profil.ROLE_ID in ('DOCTORANT')
       join CATEGORIE_PRIVILEGE cp on cp.CODE = data.categ
       join PRIVILEGE p on p.CATEGORIE_ID = cp.id and p.code = data.priv
where not exists (
      select * from PROFIL_PRIVILEGE where PRIVILEGE_ID = p.id and PROFIL_ID = profil.id
) ;

-- declaration-honneur-revoquer doit être accorder aux BDD et aux administrateurs
INSERT INTO PROFIL_PRIVILEGE (PRIVILEGE_ID, PROFIL_ID)
with data(categ, priv) as (
  select 'soutenance', 'declaration-honneur-revoquer'
)
select p.id as PRIVILEGE_ID, profil.id as PROFIL_ID
from data
       join PROFIL on profil.ROLE_ID in ('ADMIN_TECH', 'BDD')
       join CATEGORIE_PRIVILEGE cp on cp.CODE = data.categ
       join PRIVILEGE p on p.CATEGORIE_ID = cp.id and p.code = data.priv
where not exists (
      select * from PROFIL_PRIVILEGE where PRIVILEGE_ID = p.id and PROFIL_ID = profil.id
) ;
```

- Réapplication des profils
```SQL
insert into PROFIL_TO_ROLE (PROFIL_ID, ROLE_ID)
    with data(PROFIL_CODE, ROLE_ROLE_ID) as (
        select 'BDD', 'Maison du doctorat UCN' union
        select 'BDD', 'Maison du doctorat URN' union
        select 'BDD', 'Maison du doctorat ULHN'  union
        select 'BDD', 'Maison du doctorat INSA' 
    )
    select pr.id, r.id
    from data
    join PROFIL pr on pr.ROLE_ID = data.PROFIL_CODE
    join role r on r.ROLE_ID = data.ROLE_ROLE_ID
    where not exists (
        select * from PROFIL_TO_ROLE where PROFIL_ID = pr.id and ROLE_ID = r.id
    ) ;
```
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -684,7 +684,7 @@ class StructureService extends BaseService
            ->leftJoin('structure.structuresSubstituees', 'substitutionFrom')
            ->andWhere('substitutionTo.id IS NULL OR substitutionTo.histoDestruction is not null');
        if ($order) {
            $qb->orderBy(' structure.' . $order);
            $qb->orderBy(' structure.estFermee , structure.' . $order);
        }
        else {
            if ($type === TypeStructure::CODE_ECOLE_DOCTORALE || $type === TypeStructure::CODE_UNITE_RECHERCHE) {
+1 −1
Original line number Diff line number Diff line
@@ -371,7 +371,7 @@ EOS;

    private function fetchUnitesRecherches(SelectSearchFilter $filter): array
    {
        return $this->structureService->getAllStructuresAffichablesByType(TypeStructure::CODE_UNITE_RECHERCHE, 'code', false, true);
        return $this->structureService->getAllStructuresAffichablesByType(TypeStructure::CODE_UNITE_RECHERCHE, 'code', true, true);
    }

    private function fetchOriginesFinancements(SelectSearchFilter $filter): array
+73 −2
Original line number Diff line number Diff line
@@ -55,6 +55,9 @@ return [
                            PropositionPrivileges::PROPOSITION_VALIDER_UR,
                            PropositionPrivileges::PROPOSITION_VALIDER_BDD,
                            PropositionPrivileges::PROPOSITION_PRESIDENCE,

                            PropositionPrivileges::PROPOSITION_DECLARATION_HONNEUR_VALIDER,
                            PropositionPrivileges::PROPOSITION_DECLARATION_HONNEUR_REVOQUER,
                        ],
                        'resources' => ['These'],
                        'assertion' => PropositionAssertion::class,
@@ -131,8 +134,30 @@ return [
                    ],
                    'privileges' => PropositionPrivileges::PROPOSITION_SURSIS,
                ],


                [
                    'controller' => PropositionController::class,
                    'action' => [
                        'toggle-sursis',
                        'suppression',
                    ],
                    'privileges' => PropositionPrivileges::PROPOSITION_SURSIS,
                ],
                [
                    'controller' => PropositionController::class,
                    'action' => [
                        'declaration-non-plagiat',
                        'valider-declaration-non-plagiat',
                        'refuser-declaration-non-plagiat',
                    ],
                    'privileges' => PropositionPrivileges::PROPOSITION_DECLARATION_HONNEUR_VALIDER,
                ],
                [
                    'controller' => PropositionController::class,
                    'action' => [
                        'revoquer-declaration-non-plagiat',
                    ],
                    'privileges' => PropositionPrivileges::PROPOSITION_DECLARATION_HONNEUR_REVOQUER,
                ],
            ],
        ],
    ],
@@ -339,6 +364,52 @@ return [
                                    ],
                                ],
                            ],
                            'declaration-non-plagiat' => [
                                'type' => Literal::class,
                                'may_terminate' => true,
                                'options' => [
                                    'route' => '/declaration-non-plagiat',
                                    'defaults' => [
                                        'controller' => PropositionController::class,
                                        'action' => 'declaration-non-plagiat',
                                    ],
                                ],
                                'child_routes' => [
                                    'valider' => [
                                        'type' => Literal::class,
                                        'may_terminate' => true,
                                        'options' => [
                                            'route' => '/valider',
                                            'defaults' => [
                                                'controller' => PropositionController::class,
                                                'action' => 'valider-declaration-non-plagiat',
                                            ],
                                        ],
                                    ],
                                    'refuser' => [
                                        'type' => Literal::class,
                                        'may_terminate' => true,
                                        'options' => [
                                            'route' => '/refuser',
                                            'defaults' => [
                                                'controller' => PropositionController::class,
                                                'action' => 'refuser-declaration-non-plagiat',
                                            ],
                                        ],
                                    ],
                                    'revoquer' => [
                                        'type' => Literal::class,
                                        'may_terminate' => true,
                                        'options' => [
                                            'route' => '/revoquer',
                                            'defaults' => [
                                                'controller' => PropositionController::class,
                                                'action' => 'revoquer-declaration-non-plagiat',
                                            ],
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
Loading