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

Merge branch 'feature_rapports' into release_2.1.7

parents 59e43836 bc2be88d
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ Journal des modifications
- Changement du fonctionnement de sursis pour les soutenances : seul la validation acteur vérifie le délai de deux mois et le sursis annule cette vérification.
- Ajout d'une interface pour lier/délier des utilisateurs sans individu à un individu.
- Le rôle de co-directeur est maintenant un rôle attribué automatiquement
- Téléversement des rapports annuels : renommage en rapports d'activité (annuel ou de fin de thèse) ; création des privilèges *_TOUT et *_SIEN.
 
2.1.6
-----
+58 −175
Changes for config/autoload/local.php.dist: 58 added lines, 175 removed lines.
Original line number Diff line number Diff line
@@ -4,10 +4,40 @@
 */

return [
    'sygal' => [
        'archivabilite' => [
            'proxy' => [
                'enable' => true,
                'proxy_host' => 'http://proxy.unicaen.fr',
                'proxy_port' => 3128,
            ],
        ],
        'depot_version_corrigee' => [
            'resaisir_autorisation_diffusion' => false,
            'resaisir_attestations' => false,
        ],
    ],

    'actualite' => [
        'actif' => false,
        'flux' => "https://www-normandie-univ.fr/feed/?post_type=post&cat=406,448,472",
    ],

    'offre-these' => [
        'actif' => true,
    ],

    'import-api' => [
        // cf. secret.local.php
    ],

    // synchro avec unicaen/db-import
    'import' => [
        'connections' => [
            'default' => 'doctrine.connection.orm_default',
        ],
    ],

    'doctrine' => [
        // cf. secret.local.php
    ],
@@ -30,25 +60,10 @@ return [
            'do_not_send' => false,
        ],
        'ldap' => [
            'connection' => [
                'default' => [
                    'params' => [
                        // pas de LDAP
                    ]
                ]
            ]
        ],
        'maintenance' => [
            // activation (true: activé, false: désactivé)
            'enable' => false,
            // message à afficher
            'message' => "SyGAL est indisponible pour des raisons de maintenance, veuillez nous excuser pour la gêne occasionnée.",
            // le mode console est-il aussi concerné (TRUE: oui, FALSE: non)
            'include_cli' => false,
            // liste blanche des adresses IP clientes non concernées
            'white_list' => [
            // cf. secret.local.php
        ],
        'maintenance' => [
            // cf. z.maintenance.local.php
        ],
    ],

@@ -57,24 +72,42 @@ return [
    ],

    'unicaen-auth' => [
        'local' => [
            'enabled' => false,
        ],
        'ldap' => [
            'enabled' => false,
        ],
        'shib' => [
            'enable' => true,
            'order' => 1,
            'enabled' => true,
            'description' =>
                "<p><span class='glyphicon glyphicon-info-sign'></span> Cliquez sur le bouton ci-dessous pour accéder à l'authentification via la fédération d'identité.</p>" .
                "<p><strong>Attention !</strong> Si vous possédez à la fois un compte Étudiant et un compte Personnel, vous devrez utiliser " .
                "votre compte <em>Étudiant</em> pour vous authentifier...</p>",
            'simulate' => [
                // cf. secret.local.php
            ],
            'aliases' => [
                // cf. secret.local.php
            ],
            'required_attributes' => [
                // cf. secret.local.php
            ],
            'logout_url' => '/Shibboleth.sso/Logout?return=', // NB: '?return=' semble obligatoire!
        ],
        'local' => [
            'order' => 2,
            'description' => "Utilisez ce formulaire si vous possédez un compte local dédié à l'application.",
            'ldap' => [
                'enabled' => true,
            ],
            'db' => [
                'enabled' => true, // doit être activé pour que l'usurpation fonctionne (cf. Authentication/Storage/Db::read()) :-/ todo: faire mieux
            ],
        ],
        'cas' => [
            'order' => 3,
            'enabled' => false,
            'connection' => [
                // pas de CAS
            ]
        ],

        'usurpation_allowed_usernames' => [
            // cf. secret.local.php
        ],
@@ -85,7 +118,7 @@ return [
            'home' => [
                'pages' => [
                    'etab' => [
                        'label' => "Normandie Université",
                        'label' => _("Normandie Université"),
                        'title' => _("Page d'accueil du site de Normandie Université"),
                        'uri'   => 'http://www.normandie-univ.fr',
                        'class' => 'logo-etablissement',
@@ -97,154 +130,4 @@ return [
        ],
    ],

    'zenddevelopertools' => [
        /**
         * General Profiler settings
         */
        'profiler' => [
            /**
             * Enables or disables the profiler.
             *
             * Expects: bool
             * Default: true
             */
            'enabled' => true,

            /**
             * Enables or disables the strict mode. If the strict mode is enabled, any error will throw an exception,
             * otherwise all errors will be added to the report (and shown in the toolbar).
             *
             * Expects: bool
             * Default: true
             */
            'strict' => true,

            /**
             * If enabled, the profiler tries to flush the content before the it starts collecting data. This option
             * will be ignored if the Toolbar is enabled.
             *
             * Note: The flush listener listens to the MvcEvent::EVENT_FINISH event with a priority of -9400. You have
             * to disable this function if you wish to modify the output with a lower priority.
             *
             * Expects: bool
             * Default: false
             */
            'flush_early' => false,

            /**
             * The cache directory is used in the version check and for every storage type that writes to the disk.
             * Note: The default value assumes that the current working directory is the application root.
             *
             * Expects: string
             * Default: 'data/cache'
             */
            'cache_dir' => 'data/cache',

            /**
             * If a matches is defined, the profiler will be disabled if the request does not match the pattern.
             *
             * Example: 'matcher' => array('ip' => '127.0.0.1')
             * OR
             * 'matcher' => array('url' => array('path' => '/admin')
             * Note: The matcher is not implemented yet!
             */
            'matcher' => [],

            /**
             * Contains a list with all collector the profiler should run. Zend Developer Tools ships with
             * 'db' (Zend\Db), 'time', 'event', 'memory', 'exception', 'request' and 'mail' (Zend\Mail). If you wish to
             * disable a default collector, simply set the value to null or false.
             *
             * Example: 'collectors' => array('db' => null)
             * Expects: array
             */
            'collectors' => []
        ],
        'events' => [
            /**
             * Set to true to enable event-level logging for collectors that will support it. This enables a wildcard
             * listener onto the shared event manager that will allow profiling of user-defined events as well as the
             * built-in ZF events.
             *
             * Expects: bool
             * Default: false
             */
            'enabled' => true,

            /**
             * Contains a list with all event-level collectors that should run. Zend Developer Tools ships with 'time'
             * and 'memory'. If you wish to disable a default collector, simply set the value to null or false.
             *
             * Example: 'collectors' => array('memory' => null)
             * Expects: array
             */
            'collectors' => [],

            /**
             * Contains event identifiers used with the event listener. Zend Developer Tools defaults to listen to all
             * events. If you wish to disable the default all-inclusive identifier, simply set the value to null or
             * false.
             *
             * Example: 'identifiers' => array('all' => null, 'dispatchable' => 'Zend\Stdlib\DispatchableInterface')
             * Expects: array
             */
            'identifiers' => []
        ],
        /**
         * General Toolbar settings
         */
        'toolbar' => [
            /**
             * Enables or disables the Toolbar.
             *
             * Expects: bool
             * Default: false
             */
            'enabled' => true,

            /**
             * If enabled, every empty collector will be hidden.
             *
             * Expects: bool
             * Default: false
             */
            'auto_hide' => false,

            /**
             * The Toolbar position.
             *
             * Expects: string ('bottom' or 'top')
             * Default: bottom
             */
            'position' => 'bottom',

            /**
             * If enabled, the Toolbar will check if your current Zend Framework version is up-to-date.
             * Note: The check will only occur once every hour.
             *
             * Expects: bool
             * Default: false
             */
            'version_check' => false,

            /**
             * Contains a list with all collector toolbar templates. The name  of the array key must be same as the name
             * of the collector.
             *
             * Example: 'profiler' => array(
             *  'collectors' => array(
             *      // My_Collector_Example::getName() -> mycollector
             *      'MyCollector' => 'My_Collector_Example',
             *  )
             * ),
             * 'toolbar' => array(
             *  'entries' => array(
             *      'mycollector' => 'example/toolbar/my-collector',
             *  )
             * ),
             * Expects: array
             */
            'entries' => []
        ]
    ]
];
+15 −6
Changes for config/autoload/secret.local.php.dist: 15 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ return [
                'verify'   => false, // si true et faux certif : cURL error 60: SSL certificate problem: self signed certificate
                'user'     => 'sygal-app',
                'password' => 'xxxxxxxxxxx',
                'sources'  => ['apogee'],
                'connect_timeout' => 10,
            ],
        ],
    ],
@@ -54,11 +56,7 @@ return [
            ],
        ],
        'maintenance' => [
            // liste blanche des adresses IP clientes non concernées
            'white_list' => [
                //['172.17.0.1'], // docker container ip
                //['195.123.456.789', '194.123.456.789'],
            ],
            // cf. z.maintenance.local.php
        ],
    ],

@@ -95,7 +93,7 @@ return [
                'displayName',
                'sn|surname', // i.e. 'sn' ou 'surname'
                'givenName',
                'supannEtuId|supannEmpId',
                //'supannEtuId|supannEmpId',
            ],
        ],
        'usurpation_allowed_usernames' => [
@@ -103,4 +101,15 @@ return [
            'premierf@univ.fr', // auth Shibboleth
        ],
    ],

    'liste-diffusion' => [
        'email_domain' => 'liste.domain.fr',
        'sympa' => [
            'url' => 'https://liste.domain.fr',
        ],
        'proprietaires' => [
            'e.mail@domain.fr' => "Eric MAIL",
            'f.mail@domain.fr' => "Francis MAIL",
        ],
    ],
];
+19 −0
Changes for config/autoload/z.maintenance.local.php.dist: 19 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

return [
    'unicaen-app' => [
        'maintenance' => [
            // activation (true: activé, false: désactivé)
            'enable' => false,
            // message à afficher
            'message' => "SyGAL est indisponible pour des raisons de maintenance, veuillez nous excuser pour la gêne occasionnée.",
            // le mode console est-il aussi concerné (TRUE: oui, FALSE: non)
            'include_cli' => false,
            // liste blanche des adresses IP clientes non concernées
            'white_list' => [
                //['172.17.0.1'], // docker container ip
                //['195.123.123.123', '194.123.123.124'],
            ],
        ],
    ],
];
+55 −1
Changes for doc/release-notes/v2.1.7.md: 55 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -15,4 +15,58 @@ git fetch --tags && git checkout --force 2.1.6 && bash ./install.sh

## 2. Dans la base de données

Rien
 No newline at end of file
```sql

--
-- Rapports d'activité
--

update NATURE_FICHIER set CODE = 'RAPPORT_ACTIVITE' where CODE = 'RAPPORT_ANNUEL' ;
create table TYPE_RAPPORT (
                            ID NUMBER not null constraint TYPE_RAPPORT_PK primary key,
                            CODE VARCHAR2(50 char) not null,
                            LIBELLE_COURT VARCHAR2(64 char) not null,
                            LIBELLE_LONG VARCHAR2(128 char) not null
) ;
create unique index TYPE_RAPPORT_UN on TYPE_RAPPORT (CODE) ;
insert into TYPE_RAPPORT (ID, CODE, LIBELLE_COURT, LIBELLE_LONG) VALUES (1, 'RAPPORT_ACTIVITE_ANNUEL', 'Annuel', 'Rapport d''activité annuel') ;
insert into TYPE_RAPPORT (ID, CODE, LIBELLE_COURT, LIBELLE_LONG) VALUES (2, 'RAPPORT_ACTIVITE_FINTHESE', 'Fin de thèse', 'Rapport d''activité de fin de thèse') ;
alter table RAPPORT_ANNUEL modify EST_FINAL default null ;
alter table RAPPORT_ANNUEL modify EST_FINAL null ;
alter table RAPPORT_ANNUEL add TYPE_RAPPORT_ID number ;
update RAPPORT_ANNUEL set TYPE_RAPPORT_ID = 1 where EST_FINAL = 0;
update RAPPORT_ANNUEL set TYPE_RAPPORT_ID = 2 where EST_FINAL = 1;
alter table RAPPORT_ANNUEL modify TYPE_RAPPORT_ID not null ;
alter table RAPPORT_ANNUEL add constraint RAPPORT_ANNUEL_TYPE_ID_FK foreign key (TYPE_RAPPORT_ID) references TYPE_RAPPORT ;
alter table RAPPORT_ANNUEL rename to RAPPORT ;

rename RAPPORT_ANNUEL_ID_SEQ to RAPPORT_ID_SEQ;

insert into CATEGORIE_PRIVILEGE (ID, CODE, LIBELLE, ORDRE) select CATEGORIE_PRIVILEGE_ID_SEQ.nextval, 'rapport-activite', 'Rapports d''activité', 23 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-activite'
;
update PRIVILEGE set CATEGORIE_ID = (select id from CATEGORIE_PRIVILEGE where code = 'rapport-activite')
where CATEGORIE_ID = (select id from CATEGORIE_PRIVILEGE where code = 'rapport-annuel');
delete from CATEGORIE_PRIVILEGE where code = 'rapport-annuel';

update CATEGORIE_PRIVILEGE set ORDRE = 40 where code = 'validation' ;




```
Loading