-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from PnX-SI/develop
Develop > Master / 1.6.0
- Loading branch information
Showing
11 changed files
with
162 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
- name: Frontend code formatting check (Prettier) | ||
uses: creyD/[email protected] | ||
with: | ||
dry: True | ||
prettier_options: --config frontend/.prettierrc --ignore-path frontend/.prettierignore --check frontend/**/*.ts | ||
run: npm install prettier && npm run format:check | ||
working-directory: ./frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.5.2 | ||
1.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
backend/gn_module_export/migrations/1db24d9b23bc_declare_available_permissions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
"""declare available permissions | ||
Revision ID: 1db24d9b23bc | ||
Revises: bcee745e5647 | ||
Create Date: 2023-06-08 10:07:06.982520 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "1db24d9b23bc" | ||
down_revision = "bcee745e5647" | ||
branch_labels = None | ||
depends_on = ("f051b88a57fd",) | ||
|
||
|
||
def upgrade(): | ||
op.execute( | ||
""" | ||
INSERT INTO | ||
gn_permissions.t_permissions_available ( | ||
id_module, | ||
id_object, | ||
id_action, | ||
label, | ||
scope_filter | ||
) | ||
SELECT | ||
m.id_module, | ||
o.id_object, | ||
a.id_action, | ||
v.label, | ||
v.scope_filter | ||
FROM | ||
( | ||
VALUES | ||
('EXPORTS', 'ALL', 'C', False, 'Créer des exports') | ||
,('EXPORTS', 'ALL', 'R', True, 'Voir les exports') | ||
,('EXPORTS', 'ALL', 'U', False, 'Modifier les exports') | ||
,('EXPORTS', 'ALL', 'D', False, 'Supprimer des exports') | ||
) AS v (module_code, object_code, action_code, scope_filter, label) | ||
JOIN | ||
gn_commons.t_modules m ON m.module_code = v.module_code | ||
JOIN | ||
gn_permissions.t_objects o ON o.code_object = v.object_code | ||
JOIN | ||
gn_permissions.bib_actions a ON a.code_action = v.action_code | ||
""" | ||
) | ||
op.execute( | ||
""" | ||
WITH bad_permissions AS ( | ||
SELECT | ||
p.id_permission | ||
FROM | ||
gn_permissions.t_permissions p | ||
JOIN gn_commons.t_modules m | ||
USING (id_module) | ||
WHERE | ||
m.module_code = 'EXPORTS' | ||
EXCEPT | ||
SELECT | ||
p.id_permission | ||
FROM | ||
gn_permissions.t_permissions p | ||
JOIN gn_permissions.t_permissions_available pa ON | ||
(p.id_module = pa.id_module | ||
AND p.id_object = pa.id_object | ||
AND p.id_action = pa.id_action) | ||
) | ||
DELETE | ||
FROM | ||
gn_permissions.t_permissions p | ||
USING bad_permissions bp | ||
WHERE | ||
bp.id_permission = p.id_permission; | ||
""" | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.execute( | ||
""" | ||
DELETE FROM | ||
gn_permissions.t_permissions_available pa | ||
USING | ||
gn_commons.t_modules m | ||
WHERE | ||
pa.id_module = m.id_module | ||
AND | ||
module_code = 'EXPORTS' | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule GeoNature
updated
67 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
utils-flask-sqlalchemy>=0.3.5 | ||
utils-flask-sqlalchemy-geo>=0.2.8 | ||
pypnusershub>=1.6.7 | ||
geonature>=2.12.0 | ||
geonature>=2.13.0 | ||
rdflib |