Commit c5abaaaa authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'feature_rapports' into develop

parents c2711166 0a9258ac
Loading
Loading
Loading
Loading
+1 −1
Changes for composer.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
        "guzzlehttp/guzzle":             "^6.3",
        "ramsey/uuid":                   "^3.3",
        "unicaen/app":                   "^3.1",
        "unicaen/auth":                  "dev-release-3.2.0",
        "unicaen/auth":                  "^3.2",
        "unicaen/bjy-authorize":         "^3.0",
        "unicaen/code":                  "^3.0",
        "unicaen/db-import":             "^3.1",
+340 −241

File changed.

Preview size limit exceeded, changes collapsed.

+28 −16
Changes for config/autoload/unicaen-faq.global.php: 28 added lines, 16 removed lines.
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

use UnicaenFaq\Entity\Db\Faq;

return array(
return [
    'unicaen-faq' => [
        // Nom du gestionnaire d'entité concerné.
        // Par défaut: 'orm_default'.
@@ -15,18 +15,30 @@ return array(

    // Customisation de la navigation.
    // Ex: masquer le menu, modifier sa position, changer son label, associer une ressource ACL.
//    'navigation'      => [
//        'default' => [
//            'home' => [
//                'pages' => [
//                    'faq' => [
//                        'visible'  => true,
//                        'order'    => -1000,
//                        'label'    => 'FAQ',
//                        'resource' => PrivilegeController::getResourceId('UnicaenFaq\Controller\Index', 'index'),
//                    ],
//                ],
//            ],
//        ],
//    ],
);
 No newline at end of file
    'navigation' => [
        'default' => [
            'home' => [
                'pages' => [
                    'faq' => [
                        'order' => 200,
                        'label' => "Aide",
                        'pages' => [
                            'faq' => [
                                'label' => 'Questions fréquentes',
                                'route' => 'faq',
                            ],
                            'contact' => [
                                'label' => 'Contact / assistance',
                                'route' => 'contact',
                            ],
                            'apropos' => [
                                'label' => 'À propos...',
                                'route' => 'apropos',
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
];
 No newline at end of file
+136 −0
Changes for doc/release-notes/v2.2.0.md: 136 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Version 2.2.0

## 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 2.2.0 && 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

```sql
--
-- Rapport d'activité.
--
update RAPPORT set TYPE_RAPPORT_ID = 1, EST_FINAL = 1 where TYPE_RAPPORT_ID = 2 ;
update TYPE_RAPPORT set CODE = 'RAPPORT_ACTIVITE', LIBELLE_COURT = 'Activité', LIBELLE_LONG = 'Rapport d''activité' where code = 'RAPPORT_ACTIVITE_ANNUEL' ;
delete from TYPE_RAPPORT where code = 'RAPPORT_ACTIVITE_FINTHESE' ;

--
-- Rapports CSI.
--
insert into NATURE_FICHIER (ID, CODE, LIBELLE) SELECT NATURE_FICHIER_ID_SEQ.nextval, 'RAPPORT_CSI', 'Rapport CSI' from dual ;
insert into TYPE_RAPPORT (ID, CODE, LIBELLE_COURT, LIBELLE_LONG) VALUES (3, 'RAPPORT_CSI', 'CSI', 'Rapport CSI') ;
insert into CATEGORIE_PRIVILEGE (ID, CODE, LIBELLE, ORDRE) select CATEGORIE_PRIVILEGE_ID_SEQ.nextval, 'rapport-csi', 'Rapports CSI', 24 from dual ;
insert into PRIVILEGE(ID, CATEGORIE_ID, CODE, LIBELLE, ORDRE)
with tmp(code, libelle, ordre) as (
  select 'lister-tout',      'Lister les rapports concernant toute thèse',                              100 from dual union all
  select 'lister-sien',      'Lister les rapports concernant ses thèses',                               200 from dual union all
  select 'televerser-tout',  'Téléverser un rapport concernant toute thèse',                            300 from dual union all
  select 'televerser-sien',  'Téléverser un rapport concernant ses thèses',                             400 from dual union all
  select 'supprimer-tout',   'Supprimer un rapport concernant toute thèse',                             500 from dual union all
  select 'supprimer-sien',   'Supprimer un rapport concernant ses thèses',                              600 from dual union all
  select 'telecharger-tout', 'Télécharger les rapports concernant toute thèse',                         700 from dual union all
  select 'telecharger-sien', 'Télécharger les rapports concernant ses thèses',                          800 from dual union all
  select 'telecharger-zip',  'Télécharger des rapports sous la forme d''une archive compressée (.zip)', 900 from dual union all
  select 'rechercher-tout',  'Rechercher des rapports concernant toute thèse',                          1000 from dual union all
  select 'rechercher-sien',  'Rechercher des rapports concernant ses thèses',                           1100 from dual
)
select privilege_id_seq.nextval, cp.id, tmp.code, tmp.libelle, tmp.ordre from tmp
join CATEGORIE_PRIVILEGE cp on cp.CODE = 'rapport-csi'
;

--
-- Rapports mi-parcours.
--
insert into NATURE_FICHIER (ID, CODE, LIBELLE) SELECT NATURE_FICHIER_ID_SEQ.nextval, 'RAPPORT_MIPARCOURS', 'Rapport mi-parcours' from dual ;
insert into TYPE_RAPPORT (ID, CODE, LIBELLE_COURT, LIBELLE_LONG) VALUES (4, 'RAPPORT_MIPARCOURS', 'Mi-parcours', 'Rapport mi-parcours') ;
insert into CATEGORIE_PRIVILEGE (ID, CODE, LIBELLE, ORDRE) select CATEGORIE_PRIVILEGE_ID_SEQ.nextval, 'rapport-miparcours', 'Rapports mi-parcours', 24 from dual ;
insert into PRIVILEGE(ID, CATEGORIE_ID, CODE, LIBELLE, ORDRE)
with tmp(code, libelle, ordre) as (
  select 'lister-tout',      'Lister les rapports concernant toute thèse',                              100 from dual union all
  select 'lister-sien',      'Lister les rapports concernant ses thèses',                               200 from dual union all
  select 'televerser-tout',  'Téléverser un rapport concernant toute thèse',                            300 from dual union all
  select 'televerser-sien',  'Téléverser un rapport concernant ses thèses',                             400 from dual union all
  select 'supprimer-tout',   'Supprimer un rapport concernant toute thèse',                             500 from dual union all
  select 'supprimer-sien',   'Supprimer un rapport concernant ses thèses',                              600 from dual union all
  select 'telecharger-tout', 'Télécharger les rapports concernant toute thèse',                         700 from dual union all
  select 'telecharger-sien', 'Télécharger les rapports concernant ses thèses',                          800 from dual union all
  select 'telecharger-zip',  'Télécharger des rapports sous la forme d''une archive compressée (.zip)', 900 from dual union all
  select 'rechercher-tout',  'Rechercher des rapports concernant toute thèse',                          1000 from dual union all
  select 'rechercher-sien',  'Rechercher des rapports concernant ses thèses',                           1100 from dual
)
select privilege_id_seq.nextval, cp.id, tmp.code, tmp.libelle, tmp.ordre from tmp
join CATEGORIE_PRIVILEGE cp on cp.CODE = 'rapport-miparcours'
;

--
-- Validation des rapports d'activité.
-- 
create table RAPPORT_VALIDATION
(
  ID NUMBER not null constraint RAPPORT_VALIDATION_PK primary key,
  TYPE_VALIDATION_ID NUMBER not null constraint RAPPORT_VALIDATION_TYPE_FK references TYPE_VALIDATION,
  RAPPORT_ID NUMBER not null constraint RAPPORT_VALIDATION_RAPPORT_FK references RAPPORT,
  INDIVIDU_ID NUMBER default NULL constraint RAPPORT_VALIDATION_INDIV_ID_FK references INDIVIDU,
  HISTO_CREATION DATE default SYSDATE not null,
  HISTO_CREATEUR_ID NUMBER default 1 not null,
  HISTO_MODIFICATION DATE default SYSDATE not null,
  HISTO_MODIFICATEUR_ID NUMBER default 1 not null,
  HISTO_DESTRUCTION DATE,
  HISTO_DESTRUCTEUR_ID NUMBER
)
;
create index RAPPORT_VALIDATION_HCFK_IDX on RAPPORT_VALIDATION (HISTO_CREATEUR_ID)
;
create index RAPPORT_VALIDATION_HDFK_IDX on RAPPORT_VALIDATION (HISTO_DESTRUCTEUR_ID)
;
create index RAPPORT_VALIDATION_HMFK_IDX on RAPPORT_VALIDATION (HISTO_MODIFICATEUR_ID)
;
create index RAPPORT_VALIDATION_INDIV_IDX on RAPPORT_VALIDATION (INDIVIDU_ID)
;
create index RAPPORT_VALIDATION_RAPPORT_IDX on RAPPORT_VALIDATION (RAPPORT_ID)
;
create index RAPPORT_VALIDATION_TYPE_IDX on RAPPORT_VALIDATION (TYPE_VALIDATION_ID)
;
create unique index RAPPORT_VALIDATION_UN on RAPPORT_VALIDATION (TYPE_VALIDATION_ID, RAPPORT_ID, HISTO_DESTRUCTION, INDIVIDU_ID)
;
create sequence RAPPORT_VALIDATION_ID_SEQ
;

insert into TYPE_VALIDATION (ID, CODE, LIBELLE)
SELECT TYPE_VALIDATION_ID_SEQ.nextval, 'RAPPORT_ACTIVITE', 'Validation de rapport d''activité' from dual
;
insert into TYPE_VALIDATION (ID, CODE, LIBELLE)
SELECT TYPE_VALIDATION_ID_SEQ.nextval, 'RAPPORT_CSI', 'Validation de rapport CSI' from dual
;
insert into TYPE_VALIDATION (ID, CODE, LIBELLE)
SELECT TYPE_VALIDATION_ID_SEQ.nextval, 'RAPPORT_MIPARCOURS', 'Validation de rapport mi-parcours' from dual
;

insert into PRIVILEGE(ID, CATEGORIE_ID, CODE, LIBELLE, ORDRE)
with tmp(code, libelle, ordre) as (
  select 'valider-tout',  'Valider des rapports concernant toute thèse', 1500 from dual union all
  select 'valider-sien',  'Valider des rapports concernant ses thèses',  1600 from dual union all
  select 'devalider-tout',  'Dévalider des rapports concernant toute thèse', 1700 from dual union all
  select 'devalider-sien',  'Dévalider des rapports concernant ses thèses',  1800 from dual
)
select privilege_id_seq.nextval, cp.id, tmp.code, tmp.libelle, tmp.ordre
from tmp
       join CATEGORIE_PRIVILEGE cp on cp.CODE = 'rapport-activite'
;

-----> Pensez ensuite à accorder les privilèges dans Administration > Droits d'accès > Gestion des profils. <-----
```

## 3. Dans l'application SyGAL

Pensez maintenant à vous rendre dans SyGAL sur la page "Droits d'accès > Profils" pour accorder les nouveaux
privilèges de la catégorie "Rapports d'activité" aux profils concernés : Doctorant, MDD, ED, etc.
+9 −0
Changes for module/Application/Module.php: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,12 +4,15 @@ namespace Application;

use Application\Event\UserAuthenticatedEventListener;
use Application\Event\UserRoleSelectedEventListener;
use Application\View\Helper\Navigation\MenuSecondaire;
use Zend\Config\Factory as ConfigFactory;
use Zend\Console\Adapter\AdapterInterface as Console;
use Zend\Http\Request as HttpRequest;
use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;
use Zend\Stdlib\Glob;
use Zend\View\Helper\Navigation;
use Zend\View\HelperPluginManager;

class Module
{
@@ -57,6 +60,12 @@ class Module
        /** @var UserRoleSelectedEventListener $listener */
        $listener = $sm->get('UserRoleSelectedEventListener');
        $listener->attach($eventManager);

        /* @var $vhm HelperPluginManager */
        $vhm = $sm->get('ViewHelperManager');
        /* @var $nvh Navigation */
        $nvh = $vhm->get('Zend\View\Helper\Navigation');
        $nvh->getPluginManager()->setInvokableClass('menuSecondaire', MenuSecondaire::class);
    }

    public function getConfig()
Loading