From cf65b8a89c819ba2a04413c79455d0e5a4ba1252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20GUILLON?= Date: Wed, 21 Oct 2020 10:14:58 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20:=20droits=20obligatoire=20pour=20?= =?UTF-8?q?le=20profil=20"DPO"=20(patch=20sql)=20Correction=20:=20changeme?= =?UTF-8?q?nt=20d'entit=C3=A9=20via=20la=20pop-up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- CHANGELOG.md | 11 +++++ VERSION.txt | 2 +- .../CreationBase/patchs/2.0.0_to_2.0.1.sql | 42 +++++++++++++++++++ app/View/Layouts/default.ctp | 4 +- bower.json | 2 +- composer.json | 2 +- 7 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 app/Config/Schema/CreationBase/patchs/2.0.0_to_2.0.1.sql diff --git a/.env b/.env index ee5dc2e..8edcce9 100644 --- a/.env +++ b/.env @@ -4,6 +4,6 @@ DB_PASSWORD=webdpo DB_APP_NAME=webdpo DB_TEST_NAME=webdpo_test -ADD_DATA_DEV=1 +ADD_DATA_DEV=0 TZ=Europe/Paris diff --git a/CHANGELOG.md b/CHANGELOG.md index 01bf12d..1609b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ Toutes les modifications apportées au projet seront documentées dans ce fichier. Le format est basé sur le modèle [Keep a Changelog](http://keepachangelog.com/) et adhère aux principes du [Semantic Versioning](http://semver.org/). +[2.0.1] - 21-10-2020 +===== + +### Ajouts + +### Evolutions + +### Corrections +- Correction des droits obligatoire pour le profil "DPO" (patch sql) +- Correction sur l'erreur lors du changement d'entité via la pop-up + [2.0.0] - 18-09-2020 ===== diff --git a/VERSION.txt b/VERSION.txt index 227cea2..38f77a6 100755 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -2.0.0 +2.0.1 diff --git a/app/Config/Schema/CreationBase/patchs/2.0.0_to_2.0.1.sql b/app/Config/Schema/CreationBase/patchs/2.0.0_to_2.0.1.sql new file mode 100644 index 0000000..03e906f --- /dev/null +++ b/app/Config/Schema/CreationBase/patchs/2.0.0_to_2.0.1.sql @@ -0,0 +1,42 @@ +BEGIN; + +INSERT INTO role_droits (role_id, liste_droit_id) + SELECT roles.id, liste_droits.id + FROM roles + INNER JOIN liste_droits ON (1 = 1) + WHERE + roles.libelle = 'DPO' + AND liste_droits.libelle IN ( + 'Créer un article dans la FAQ', + 'Modifier un article dans la FAQ', + 'Consulter la FAQ', + 'Supprimer un article dans la FAQ', + 'Gestion du typage des annexes', + 'Consulter tous les traitements dans l''entité', + 'Gestion des co-responsables lors de la déclaration d''un traitement', + 'Gestion des sous-traitants lors de la déclaration d''un traitement' + ) + ORDER BY roles.id, liste_droits.id; + +INSERT INTO droits (organisation_user_id, liste_droit_id, created, modified) + SELECT organisations_users.id, liste_droits.id, NOW(), NOW() + FROM organisations_users + INNER JOIN liste_droits ON (1 = 1) + WHERE (organisations_users.organisation_id, organisations_users.user_id) IN ( + SELECT organisations.id, organisations.dpo + FROM organisations + WHERE organisations.dpo IS NOT NULL + ) + AND liste_droits.libelle IN ( + 'Créer un article dans la FAQ', + 'Modifier un article dans la FAQ', + 'Consulter la FAQ', + 'Supprimer un article dans la FAQ', + 'Gestion du typage des annexes', + 'Consulter tous les traitements dans l''entité', + 'Gestion des co-responsables lors de la déclaration d''un traitement', + 'Gestion des sous-traitants lors de la déclaration d''un traitement' + ) + ORDER BY organisations_users.id, liste_droits.id; + +COMMIT; diff --git a/app/View/Layouts/default.ctp b/app/View/Layouts/default.ctp index fc43fe2..3a1e1a0 100644 --- a/app/View/Layouts/default.ctp +++ b/app/View/Layouts/default.ctp @@ -706,7 +706,9 @@ if ($modalSelectOrganisations === true) { // Pop-up pour administrer une entité - echo $this->element('Default/modalChangeEntite'); + echo $this->element('Default/modalChangeEntite', [ + 'listeMesOrganisation' => $listeMesOrganisation + ]); } ?> diff --git a/bower.json b/bower.json index cafd191..d388259 100755 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "webdpo", "description": "Gestion de vos traitements dans le cadre de la réglementation relative à la protection des données personnelles (RGPD)", - "version": "2.0.0", + "version": "2.0.1", "directory": "app/webroot/js/", "authors": [ "Théo GUILLON " diff --git a/composer.json b/composer.json index 259b127..7d7cbf4 100755 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "web-dpo/web-dpo", "description": "Gestion de vos traitements dans le cadre de la réglementation relative à la protection des données personnelles (RGPD)", - "version": "2.0.0", + "version": "2.0.1", "authors": [ { "name": "Théo GUILLON", -- GitLab