From ecdbba25d1b10ba4fb3894a6d7891eb2b7f6c2f8 Mon Sep 17 00:00:00 2001 From: "joel.clement" Date: Mon, 22 Mar 2021 17:14:33 +0100 Subject: [PATCH 1/5] update db --- data/migration/migration_0.2.1_0.2.2.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/migration/migration_0.2.1_0.2.2.sql b/data/migration/migration_0.2.1_0.2.2.sql index fb2306d0a..79b3335cc 100644 --- a/data/migration/migration_0.2.1_0.2.2.sql +++ b/data/migration/migration_0.2.1_0.2.2.sql @@ -1,7 +1,15 @@ +-- Ajout contrainte sur la table des objets de permission +-- Devrait être dans GN2 +-- TODO supprimer ces deux lignes une fois présentes dans GN2 +ALTER TABLE gn_permissions.t_objects DROP CONSTRAINT IF EXISTS unique_t_objects; +ALTER TABLE gn_permissions.t_objects ADD CONSTRAINT unique_t_objects UNIQUE (code_object); + + INSERT INTO gn_permissions.t_objects (code_object, description_object) VALUES ('GNM_SITES', 'Permissions sur les sites'), ('GNM_VISITES', 'Permissions sur les visites'), ('GNM_OBSERVATIONS', 'Permissions sur les observation'), ('GNM_GRP_SITES', 'Permissions sur les groupes de sites') +ON CONFLICT(code_object) DO NOTHING; ; From 394b0465a9288838c059e629d73707923ea9ac82 Mon Sep 17 00:00:00 2001 From: Maxime Toma <66769358+maximetoma@users.noreply.github.com> Date: Tue, 23 Mar 2021 10:38:20 +0100 Subject: [PATCH 2/5] Update MAJ.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rajout d'un .sh sur la dernière commande --- docs/MAJ.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/MAJ.rst b/docs/MAJ.rst index 9cc3edb19..607ebb1b0 100644 --- a/docs/MAJ.rst +++ b/docs/MAJ.rst @@ -53,4 +53,4 @@ Mise à jour du module :: - /home/`whoami`/gn_module_monitoring/data/update_views /home/`whoami`/geonature + /home/`whoami`/gn_module_monitoring/data/update_views.sh /home/`whoami`/geonature From 9cdafe6012570bb30a86814ed53dbf6b054419bc Mon Sep 17 00:00:00 2001 From: amandine-sahl Date: Thu, 25 Mar 2021 12:15:19 +0100 Subject: [PATCH 3/5] =?UTF-8?q?Pb=20h=C3=A9ritage=20des=20permissions=20-?= =?UTF-8?q?=20cf=20#78?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/routes/decorators.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/routes/decorators.py b/backend/routes/decorators.py index 01fdd1635..95b7a31aa 100644 --- a/backend/routes/decorators.py +++ b/backend/routes/decorators.py @@ -40,11 +40,10 @@ def cruved_scope_for_user_in_monitoring_module(module_code=None, object_code=Non # get_monitoring from route parameter monitoring_url module = None herited = False - if module_code and module_code != "null": module = get_module("module_code", module_code) module_code = module.module_code - append = {10: ["MONOTORINGS", object_code], 25: ["MONOTORINGS", "ALL"]} + append = {15: ["MONOTORINGS", object_code], 25: ["MONOTORINGS", "ALL"]} else: module_code = "MONITORINGS" append = {} From 42850d7fe4c82d2fe18f879f4a4c30743cb38f02 Mon Sep 17 00:00:00 2001 From: amandine-sahl Date: Thu, 25 Mar 2021 12:49:14 +0100 Subject: [PATCH 4/5] =?UTF-8?q?Pb=20h=C3=A9ritage=20des=20permissions=20-?= =?UTF-8?q?=20cf=20#78?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/routes/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/routes/decorators.py b/backend/routes/decorators.py index 95b7a31aa..d8497831c 100644 --- a/backend/routes/decorators.py +++ b/backend/routes/decorators.py @@ -43,7 +43,7 @@ def cruved_scope_for_user_in_monitoring_module(module_code=None, object_code=Non if module_code and module_code != "null": module = get_module("module_code", module_code) module_code = module.module_code - append = {15: ["MONOTORINGS", object_code], 25: ["MONOTORINGS", "ALL"]} + append = {15: ["MONITORINGS", object_code], 25: ["MONITORINGS", "ALL"]} else: module_code = "MONITORINGS" append = {} From ba78e6520e722c09bb2df7beb8a7838f5bd4f164 Mon Sep 17 00:00:00 2001 From: amandine-sahl Date: Thu, 1 Apr 2021 11:40:48 +0200 Subject: [PATCH 5/5] Prepa release --- VERSION | 2 +- docs/changelog.rst | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 6710fa219..373f8c6f0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.2dev +0.2.3 \ No newline at end of file diff --git a/docs/changelog.rst b/docs/changelog.rst index 7ed97bd68..9bd029887 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,7 +2,21 @@ CHANGELOG ========= -0.2.2 (unrelease) +0.2.3 (2021-04-01) +======= + +* Version minimale de GeoNature nécessaire : 2.5.5 +* +**🐛 Corrections** + + +* Problème héritage des permissions #78 + +**⚠️ Notes de version** +Si vous mettez à jour le module : +* Suivez la procédure classique de mise à jour du module (``docs/MAJ.rst``) + +0.2.2 (2021-03-22) ======= * Version minimale de GeoNature nécessaire : 2.5.5