Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl committed Apr 1, 2021
2 parents bf0ef19 + ba78e65 commit 94725bc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.2dev
0.2.3
3 changes: 1 addition & 2 deletions backend/routes/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: ["MONITORINGS", object_code], 25: ["MONITORINGS", "ALL"]}
else:
module_code = "MONITORINGS"
append = {}
Expand Down
8 changes: 8 additions & 0 deletions data/migration/migration_0.2.1_0.2.2.sql
Original file line number Diff line number Diff line change
@@ -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;
;
2 changes: 1 addition & 1 deletion docs/MAJ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 15 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94725bc

Please sign in to comment.