Commit 897b8696 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'release_4.0.4'

parents 37d5b08c 20a0e0af
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
Journal des modifications
=========================

4.0.4
-----
- Correction de typos dans mail de feu vert de la soutenance
- Ajout de redirection de mail lorsque certains mails n'ont pas de destinataire "ATTENTION MAIL NON DÉLIVRÉ".
- Compléments d'individu : mise en place des éléments de base 
- Modification du texte de mail de réussite au doctorat
- [FIX] verification des assertions au niveau des actions de PropositionController

4.0.3
-----
- Corrections et améliorations de la doc d'install suite aux remarques de l'université de Montpellier (merci)
- [FIX] Correction de l'affichage de la date d'historisation dans Individu lié
- [FIX] Correction de la signature de Membre::setEtablissement(?string) qui faisait planter la création de proprosition (lorsqu'aucun établissement n'était fourni)
- Ajout de l'unité de recherche des acteurs (manuel pour le moment) pour améliorer les pages de couverture

4.0.2
-----
- [FIX] Affichage de la bonne adresse électronique institutionnelle sur la fiche thèse 
+1 −1
Original line number Diff line number Diff line
@@ -14,4 +14,4 @@ COPY . /app

WORKDIR /app

RUN composer install
#RUN composer install
+96 −0
Original line number Diff line number Diff line
# Version 4.0.4

## 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 4.0.4 && bash ./install.sh
```

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

## 2. Dans la base de données

- Creation de la table contenant les compléments d'individu : email, établissement, unité de recherche 

```SQL
create table individu_compl
(
  id                    serial                                                  constraint individu_compl_pk primary key,
  individu_id           integer                                 not null        constraint table_name_individu_id_fk references individu on delete cascade,
  email                 varchar(1024),
  etablissement_id      integer                                                 constraint individu_compl_etablissement_id_fk references etablissement on delete set null,
  unite_id              integer                                                 constraint individu_compl_unite_rech_id_fk references unite_rech on delete set null,
  histo_creation        timestamp       default CURRENT_DATE    not null    ,
  histo_createur_id     integer                                 not null        constraint utilisateur_id_fk_1 references utilisateur,
  histo_modification    timestamp,
  histo_modificateur_id integer                                                 constraint utilisateur_id_fk_2 references utilisateur,
  histo_destruction     timestamp,
  histo_destructeur_id  integer                                                 constraint tilisateur_id_fk_3 references utilisateur
);
create unique index individu_compl_id_uindex on individu_compl (id);
```

- Ajout des privilèges 
```SQL
create sequence if not exists categorie_privilege_id_seq ;

insert into categorie_privilege (id, code, libelle, ordre) values (nextval('categorie_privilege_id_seq'), 'individu', 'Gestion des individus', 500);

INSERT INTO privilege(id, CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
  SELECT 'individucompl_index',       'Accéder à l''index des compléments d''individu', 10 UNION
  SELECT 'individucompl_afficher',    'Afficher un complément d''individu', 20 UNION
  SELECT 'individucompl_modifier',    'Modifier un complément d''individu', 30 UNION
  SELECT 'individucompl_supprimer',   'Suppression un complément d''individu', 40
)
SELECT nextval('privilege_id_seq'), cp.id, d.code, d.lib, d.ordre
FROM d
       JOIN categorie_privilege cp ON cp.CODE = 'individu';
```

- Accord les privilèges : Admin, Mdd, doctorant, directeur, co-directeurs

```SQL
INSERT INTO PROFIL_PRIVILEGE (PRIVILEGE_ID, PROFIL_ID)
with data(categ, priv) as (
  select 'individu'::text, 'individucompl_index'::text 
)
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
) ;

INSERT INTO PROFIL_PRIVILEGE (PRIVILEGE_ID, PROFIL_ID)
with data(categ, priv) as (
  select 'individu'::text, 'individucompl_afficher'::text UNION
  select 'individu'::text, 'individucompl_modifier'::text UNION
  select 'individu'::text, 'individucompl_supprimer'::text
)
select p.id as PRIVILEGE_ID, profil.id as PROFIL_ID
from data
       join PROFIL on profil.ROLE_ID in ('ADMIN_TECH', 'BDD', 'DOCTORANT', 'D', 'K')
       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
  ) ;

insert into ROLE_PRIVILEGE (ROLE_ID, PRIVILEGE_ID)
select p2r.ROLE_ID, pp.PRIVILEGE_ID
from PROFIL_TO_ROLE p2r
       join profil pr on pr.id = p2r.PROFIL_ID
       join PROFIL_PRIVILEGE pp on pp.PROFIL_ID = pr.id
where not exists (
        select * from role_privilege where role_id = p2r.role_id and privilege_id = pp.privilege_id
  )
;
``` 
 No newline at end of file
+16 −0
Original line number Diff line number Diff line
@@ -16,6 +16,13 @@ return [
    'bjyauthorize'    => [
        'guards' => [
            PrivilegeController::class => [
                [
                    'controller' => EcoleDoctoraleController::class,
                    'action'     => [
                        'rechercher'
                    ],
                    'role' => [],
                ],
                [
                    'controller' => EcoleDoctoraleController::class,
                    'action'     => [
@@ -69,6 +76,15 @@ return [
                ],
                'may_terminate' => true,
                'child_routes'  => [
                    'rechercher' => [
                        'type'          => Literal::class,
                        'options'       => [
                            'route'       => '/rechercher',
                            'defaults'    => [
                                'action' => 'rechercher',
                            ],
                        ],
                    ],
                    'information' => [
                        'type'          => Segment::class,
                        'options'       => [
+16 −0
Original line number Diff line number Diff line
@@ -16,6 +16,13 @@ return [
    'bjyauthorize'    => [
        'guards' => [
            PrivilegeController::class => [
                [
                    'controller' => EtablissementController::class,
                    'action'     => [
                        'rechercher',
                    ],
                    'role' => [],
                ],
                [
                    'controller' => EtablissementController::class,
                    'action'     => [
@@ -69,6 +76,15 @@ return [
                ],
                'may_terminate' => true,
                'child_routes'  => [
                    'rechercher' => [
                        'type'          => Literal::class,
                        'options'       => [
                            'route'       => '/rechercher',
                            'defaults'    => [
                                'action' => 'rechercher',
                            ],
                        ],
                    ],
                    'information' => [
                        'type'          => Segment::class,
                        'options'       => [
Loading