From 2be613345881a157930e4e17e2b732d13d06adf7 Mon Sep 17 00:00:00 2001 From: thomasl Date: Sun, 22 Dec 2024 20:42:20 +0100 Subject: [PATCH 1/8] Update file initial.json --- apps/permission/fixtures/initial.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index baed9a8d..ca9d8810 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -3800,6 +3800,22 @@ "description": "Voir les utilisateurs adhérents au club parent" } }, + { + "model": "permission.permission", + "pk": 242, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"AND\", [{\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}}, {\"valid\": false}]]", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer une transaction vers la note d'un club" + } + }, { "model": "permission.role", "pk": 1, From a63c34fe371f1079705bd4304bbeee1239409180 Mon Sep 17 00:00:00 2001 From: thomasl Date: Sun, 22 Dec 2024 21:38:17 +0100 Subject: [PATCH 2/8] Update file initial.json --- apps/permission/fixtures/initial.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index ca9d8810..766ea03a 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -3808,7 +3808,7 @@ "note", "transaction" ], - "query": "[\"AND\", [{\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}}, {\"valid\": false}]]", + "query": "[\"AND\", {\"destination\": [\"club\", \"note\"]}, [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}}, {\"valid\": false}]]", "type": "add", "mask": 2, "field": "", From 942d887c2e994bdefee0b0ee950db4d678eb1d14 Mon Sep 17 00:00:00 2001 From: thomasl Date: Mon, 23 Dec 2024 18:31:11 +0100 Subject: [PATCH 3/8] Update file initial.json --- apps/permission/fixtures/initial.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 766ea03a..565a604c 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -3816,6 +3816,22 @@ "description": "Créer une transaction vers la note d'un club" } }, + { + "model": "permission.permission", + "pk": 243, + "fields": { + "model": [ + "member", + "profile" + ], + "query": "{\"user__memberships__club\": [\"club\"], \"user__memberships__date_start__lte\": [\"today\"],\"user__memberships__date_end__gte\": [\"today\"]}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir les profils des membres du club" + } + }, { "model": "permission.role", "pk": 1, From 80e109114f99c14bd3df29ad7be2d850d21818b2 Mon Sep 17 00:00:00 2001 From: thomasl Date: Fri, 17 Jan 2025 18:23:28 +0100 Subject: [PATCH 4/8] Update file initial.json --- apps/permission/fixtures/initial.json | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 565a604c..33d71663 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -4410,6 +4410,41 @@ ] } }, + { + "model": "permission.role", + "pk": 23, + "fields": { + "for_club": 10, + "name": "Tr\u00e9sorièr\u22c5e BDA", + "permissions": [ + 33, + 55, + 56, + 57, + 58, + 135, + 143, + 176, + 177, + 178 + ] + } + }, + { + "model": "permission.role", + "pk": 24, + "fields": { + "for_club": 10, + "name": "Respo sortie", + "permissions": [ + 239, + 240, + 241, + 242, + 243 + ] + } + }, { "model": "wei.weirole", "pk": 12, From 54ba78688429ad2450935fa561f8abb2d1d304cc Mon Sep 17 00:00:00 2001 From: thomasl Date: Fri, 17 Jan 2025 19:03:59 +0100 Subject: [PATCH 5/8] Update file initial.json --- apps/permission/fixtures/initial.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 33d71663..a5ba4dc9 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -4414,7 +4414,7 @@ "model": "permission.role", "pk": 23, "fields": { - "for_club": 10, + "for_club": 2, "name": "Tr\u00e9sorièr\u22c5e BDA", "permissions": [ 33, From caaeab6b0bafc5eda2a041053a577e563cb99162 Mon Sep 17 00:00:00 2001 From: thomasl Date: Fri, 17 Jan 2025 19:39:26 +0100 Subject: [PATCH 6/8] Update file initial.json --- apps/permission/fixtures/initial.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index a5ba4dc9..597b7fa7 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -4414,7 +4414,7 @@ "model": "permission.role", "pk": 23, "fields": { - "for_club": 2, + "for_club": 10, "name": "Tr\u00e9sorièr\u22c5e BDA", "permissions": [ 33, @@ -4445,6 +4445,28 @@ ] } }, + { + "model": "permission.role", + "pk": 25, + "fields": { + "for_club": 267, + "name": "Tr\u00e9sorièr\u22c5e Terre à terre", + "permissions": [ + 33, + 55, + 56, + 57, + 58, + 135, + 143, + 176, + 177, + 178 + ] + } + }, + + { "model": "wei.weirole", "pk": 12, From 43dc67674740e165ae6a63192155b2a412f1242e Mon Sep 17 00:00:00 2001 From: thomasl Date: Sat, 18 Jan 2025 12:57:42 +0100 Subject: [PATCH 7/8] Update file initial.json --- apps/permission/fixtures/initial.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 597b7fa7..f1a5a50b 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -4465,6 +4465,17 @@ ] } }, + { + "model": "permission.role", + "pk": 26, + "fields": { + "for_club": 282, + "name": "Tr\u00e9sorièr\u22c5e Gala", + "permissions": [ + 33 + ] + } + }, { From bd6ed27ae54c5eea40f66f08045e1519036c5318 Mon Sep 17 00:00:00 2001 From: thomasl Date: Sat, 18 Jan 2025 15:11:57 +0100 Subject: [PATCH 8/8] Update 2 files - /apps/permission/fixtures/initial.json - /apps/permission/admin.py --- apps/permission/admin.py | 1 + apps/permission/fixtures/initial.json | 70 +-------------------------- 2 files changed, 2 insertions(+), 69 deletions(-) diff --git a/apps/permission/admin.py b/apps/permission/admin.py index a6fc713c..82f8d4ab 100644 --- a/apps/permission/admin.py +++ b/apps/permission/admin.py @@ -31,3 +31,4 @@ class RoleAdmin(admin.ModelAdmin): Admin customisation for Role """ list_display = ('name', ) + filter_horizontal = ('permissions',) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index f1a5a50b..00f952cc 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -4409,75 +4409,7 @@ 238 ] } - }, - { - "model": "permission.role", - "pk": 23, - "fields": { - "for_club": 10, - "name": "Tr\u00e9sorièr\u22c5e BDA", - "permissions": [ - 33, - 55, - 56, - 57, - 58, - 135, - 143, - 176, - 177, - 178 - ] - } - }, - { - "model": "permission.role", - "pk": 24, - "fields": { - "for_club": 10, - "name": "Respo sortie", - "permissions": [ - 239, - 240, - 241, - 242, - 243 - ] - } - }, - { - "model": "permission.role", - "pk": 25, - "fields": { - "for_club": 267, - "name": "Tr\u00e9sorièr\u22c5e Terre à terre", - "permissions": [ - 33, - 55, - 56, - 57, - 58, - 135, - 143, - 176, - 177, - 178 - ] - } - }, - { - "model": "permission.role", - "pk": 26, - "fields": { - "for_club": 282, - "name": "Tr\u00e9sorièr\u22c5e Gala", - "permissions": [ - 33 - ] - } - }, - - + }, { "model": "wei.weirole", "pk": 12,