1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-01-19 06:31:20 +00:00

Merge branch 'New_permission' into 'main'

New permission

See merge request bde/nk20!278
This commit is contained in:
thomasl 2025-01-18 15:41:15 +01:00
commit 3559787fa7
2 changed files with 34 additions and 1 deletions

View File

@ -31,3 +31,4 @@ class RoleAdmin(admin.ModelAdmin):
Admin customisation for Role
"""
list_display = ('name', )
filter_horizontal = ('permissions',)

View File

@ -3800,6 +3800,38 @@
"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.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,
@ -4377,7 +4409,7 @@
238
]
}
},
},
{
"model": "wei.weirole",
"pk": 12,