1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Improved permissions, 404 and 403 errors will be more frequent (when we type an invalid URL)

This commit is contained in:
Yohann D'ANELLO
2020-03-31 04:16:30 +02:00
parent c384ee02eb
commit 1aae18e6a6
13 changed files with 272 additions and 105 deletions

View File

@ -176,7 +176,7 @@
"note",
"alias"
],
"query": "[\"OR\", {\"note__in\": [\"NoteUser\", \"objects\", [\"filter\", {\"user__membership__club__name\": \"Kfet\"}], [\"all\"]]}, {\"note__in\": [\"NoteClub\", \"objects\", [\"all\"]]}]",
"query": "[\"OR\", {\"note__in\": [\"NoteUser\", \"objects\", [\"filter\", {\"user__membership__club__name\": \"Kfet\"}], [\"all\"]]}, {\"note__in\": [\"NoteClub\", \"objects\", [\"all\"]]}, {\"note__in\": [\"NoteActivity\", \"objects\", [\"all\"]]}]",
"type": "view",
"mask": 1,
"field": "",
@ -386,7 +386,7 @@
"note",
"transaction"
],
"query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], {\"amount__lte\": {\"F\": [\"ADD\", [\"F\", \"source__balance\"], 5000]}}]",
"query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"amount__lte\": {\"F\": [\"ADD\", [\"F\", \"source__balance\"], 5000]}}, {\"valid\": false}]]",
"type": "add",
"mask": 2,
"field": "",
@ -783,6 +783,111 @@
"description": "Validate invitation transactions"
}
},
{
"model": "permission.permission",
"pk": 47,
"fields": {
"model": [
"member",
"club"
],
"query": "{\"pk\": [\"club\", \"pk\"]}",
"type": "change",
"mask": 1,
"field": "",
"description": "Update club"
}
},
{
"model": "permission.permission",
"pk": 48,
"fields": {
"model": [
"note",
"noteactivity"
],
"query": "{\"club\": [\"club\"]}",
"type": "change",
"mask": 1,
"field": "",
"description": "Manage notes that are linked to a club"
}
},
{
"model": "permission.permission",
"pk": 49,
"fields": {
"model": [
"note",
"noteactivity"
],
"query": "{\"club\": [\"club\"]}",
"type": "view",
"mask": 1,
"field": "",
"description": "View notes that are linked to a club"
}
},
{
"model": "permission.permission",
"pk": 50,
"fields": {
"model": [
"note",
"transaction"
],
"query": "[\"AND\", [\"OR\", {\"source__noteactivity__controller\": [\"user\"]}, {\"destination__noteactivity__controller\": [\"user\"]}], [\"OR\", {\"amount__lte\": {\"F\": [\"ADD\", [\"F\", \"source__balance\"], 5000]}}, {\"valid\": false}]]",
"type": "add",
"mask": 2,
"field": "",
"description": "Add transactions linked to a noteactivity"
}
},
{
"model": "permission.permission",
"pk": 51,
"fields": {
"model": [
"note",
"transaction"
],
"query": "[\"AND\", [\"OR\", {\"source__noteactivity__controller\": [\"user\"]}, {\"destination__noteactivity__controller\": [\"user\"]}]]",
"type": "view",
"mask": 1,
"field": "",
"description": "View transactions linked to a noteactivity"
}
},
{
"model": "permission.permission",
"pk": 52,
"fields": {
"model": [
"note",
"note"
],
"query": "{\"noteactivity__controller\": [\"user\"]}",
"type": "view",
"mask": 1,
"field": "",
"description": "View note activity"
}
},
{
"model": "permission.permission",
"pk": 53,
"fields": {
"model": [
"note",
"noteactivity"
],
"query": "{\"controller\": [\"user\"]}",
"type": "view",
"mask": 1,
"field": "",
"description": "View note activity"
}
},
{
"model": "permission.rolepermissions",
"pk": 1,
@ -810,7 +915,6 @@
3,
4,
5,
6,
7,
8,
9,
@ -827,7 +931,12 @@
35,
36,
39,
40
40,
6,
52,
53,
51,
50
]
}
},
@ -838,9 +947,9 @@
"role": 8,
"permissions": [
19,
20,
21,
22
22,
20
]
}
},
@ -880,5 +989,18 @@
46
]
}
},
{
"model": "permission.rolepermissions",
"pk": 6,
"fields": {
"role": 7,
"permissions": [
22,
47,
48,
49
]
}
}
]