mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-29 12:50:55 +02:00
Compare commits
26 Commits
inclusive
...
6b1cd3ba7a
Author | SHA1 | Date | |
---|---|---|---|
6b1cd3ba7a | |||
9f114b8ca2 | |||
e0132b6dc8 | |||
31e67ae3f6 | |||
2839d3de1e | |||
30afa6da0a | |||
84fc77696f | |||
19fc620d1f | |||
6bceb394c5 | |||
62cf8f9d84 | |||
2dd1c3fb89 | |||
c8665c5798 | |||
e9f1b6f52d | |||
1d95ae4810 | |||
84b16ab603 | |||
6a1b51dbbf | |||
c441a43a8b | |||
87f3b51b04 | |||
0a853fd3e6 | |||
c429734810 | |||
5d759111b6 | |||
70baf7566c | |||
eb355f547c | |||
7068170f18 | |||
45ee9a8941 | |||
454ea19603 |
@ -6,7 +6,7 @@
|
||||
"name": "Pot",
|
||||
"manage_entries": true,
|
||||
"can_invite": true,
|
||||
"guest_entry_fee": 500
|
||||
"guest_entry_fee": 1000
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -28,5 +28,25 @@
|
||||
"can_invite": false,
|
||||
"guest_entry_fee": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "activity.activitytype",
|
||||
"pk": 5,
|
||||
"fields": {
|
||||
"name": "Soir\u00e9e avec entrées",
|
||||
"manage_entries": true,
|
||||
"can_invite": false,
|
||||
"guest_entry_fee": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "activity.activitytype",
|
||||
"pk": 7,
|
||||
"fields": {
|
||||
"name": "Soir\u00e9e avec invitations",
|
||||
"manage_entries": true,
|
||||
"can_invite": true,
|
||||
"guest_entry_fee": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
|
5
apps/api/pagination.py
Normal file
5
apps/api/pagination.py
Normal file
@ -0,0 +1,5 @@
|
||||
from rest_framework.pagination import PageNumberPagination
|
||||
|
||||
class CustomPagination(PageNumberPagination):
|
||||
page_size_query_param = 'page_size'
|
||||
|
@ -243,7 +243,7 @@
|
||||
"type": "delete",
|
||||
"mask": 1,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"permanent": true,
|
||||
"description": "Supprimer un alias à sa note"
|
||||
}
|
||||
},
|
||||
@ -369,7 +369,7 @@
|
||||
],
|
||||
"query": "{}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "valid",
|
||||
"permanent": false,
|
||||
"description": "Mettre à jour le statut de validation d'une transaction"
|
||||
@ -705,7 +705,7 @@
|
||||
],
|
||||
"query": "{}",
|
||||
"type": "view",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Voir toutes les transactions d'invitation"
|
||||
@ -737,7 +737,7 @@
|
||||
],
|
||||
"query": "{\"pk\": [\"club\", \"pk\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Modifier un club"
|
||||
@ -865,7 +865,7 @@
|
||||
],
|
||||
"query": "{}",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Ajouter un utilisateur"
|
||||
@ -881,7 +881,7 @@
|
||||
],
|
||||
"query": "{\"email_confirmed\": false, \"registration_valid\": false}",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Ajouter un profil"
|
||||
@ -961,7 +961,7 @@
|
||||
],
|
||||
"query": "{\"destination\": [\"club\", \"note\"]}",
|
||||
"type": "change",
|
||||
"mask": 2,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Modifier le bouton d'un club"
|
||||
@ -1105,7 +1105,7 @@
|
||||
],
|
||||
"query": "{}",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Ajouter un crédit de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale"
|
||||
@ -1137,7 +1137,7 @@
|
||||
],
|
||||
"query": "{}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Modifier un crédit de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale"
|
||||
@ -1281,7 +1281,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"first_year\": true, \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"], \"membership\": null}",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Inscrire un 1A au WEI"
|
||||
@ -1297,7 +1297,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"], \"membership\": null}",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Inscrire n'importe qui au WEI"
|
||||
@ -1313,7 +1313,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"]}",
|
||||
"type": "delete",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Supprimer une inscription WEI"
|
||||
@ -1345,9 +1345,9 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"]}",
|
||||
"type": "view",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": true,
|
||||
"permanent": false,
|
||||
"description": "Voir toutes les inscriptions WEI"
|
||||
}
|
||||
},
|
||||
@ -1361,7 +1361,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "soge_credit",
|
||||
"permanent": false,
|
||||
"description": "Indiquer si une inscription WEI est payée par la Société générale"
|
||||
@ -1393,7 +1393,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "caution_check",
|
||||
"permanent": false,
|
||||
"description": "Dire si un chèque de caution est donné pour une inscription WEI"
|
||||
@ -1409,7 +1409,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "birth_date",
|
||||
"permanent": false,
|
||||
"description": "Modifier la date de naissance d'une inscription WEI"
|
||||
@ -1441,7 +1441,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "gender",
|
||||
"permanent": false,
|
||||
"description": "Modifier le genre de toute inscription WEI"
|
||||
@ -1473,7 +1473,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "health_issues",
|
||||
"permanent": false,
|
||||
"description": "Modifier les problèmes de santé de toutes les inscriptions WEI"
|
||||
@ -1505,7 +1505,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "emergency_contact_name",
|
||||
"permanent": false,
|
||||
"description": "Modifier le nom du contact en cas d'urgence de toute inscription WEI"
|
||||
@ -1537,7 +1537,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "emergency_contact_phone",
|
||||
"permanent": false,
|
||||
"description": "Modifier le téléphone du contact en cas d'urgence de toute inscription WEI"
|
||||
@ -1569,7 +1569,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "information_json",
|
||||
"permanent": false,
|
||||
"description": "Modifier les informations (sondage 1A, ...) d'une inscription WEI"
|
||||
@ -1697,9 +1697,9 @@
|
||||
],
|
||||
"query": "[\"AND\", {\"club\": [\"club\"], \"club__weiclub__membership_end__gte\": [\"today\"]}, [\"OR\", {\"registration__soge_credit\": true}, {\"user__note__balance__gte\": {\"F\": [\"F\", \"fee\"]}}]]",
|
||||
"type": "add",
|
||||
"mask": 3,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": true,
|
||||
"permanent": false,
|
||||
"description": "Créer une adhésion WEI pour le dernier WEI"
|
||||
}
|
||||
},
|
||||
@ -1713,7 +1713,7 @@
|
||||
],
|
||||
"query": "{\"club\": [\"club\"], \"club__weiclub__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "bus",
|
||||
"permanent": false,
|
||||
"description": "Modifier le bus d'une adhésion WEI"
|
||||
@ -1729,7 +1729,7 @@
|
||||
],
|
||||
"query": "{\"club\": [\"club\"], \"club__weiclub__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "team",
|
||||
"permanent": false,
|
||||
"description": "Modifier l'équipe d'une adhésion WEI"
|
||||
@ -1745,9 +1745,9 @@
|
||||
],
|
||||
"query": "{\"club\": [\"club\"]}",
|
||||
"type": "view",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": true,
|
||||
"permanent": false,
|
||||
"description": "Voir toutes les adhésions au WEI"
|
||||
}
|
||||
},
|
||||
@ -1777,9 +1777,9 @@
|
||||
],
|
||||
"query": "{\"club\": [\"club\"], \"bus\": [\"membership\", \"weimembership\", \"bus\"]}",
|
||||
"type": "view",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": true,
|
||||
"permanent": false,
|
||||
"description": "Voir les membres du bus"
|
||||
}
|
||||
},
|
||||
@ -1793,9 +1793,9 @@
|
||||
],
|
||||
"query": "{\"club\": [\"club\"], \"team\": [\"membership\", \"weimembership\", \"team\"]}",
|
||||
"type": "view",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": true,
|
||||
"permanent": false,
|
||||
"description": "Voir les membres de l'équipe"
|
||||
}
|
||||
},
|
||||
@ -1809,7 +1809,7 @@
|
||||
],
|
||||
"query": "{\"pk\": [\"membership\", \"weimembership\", \"bus\", \"pk\"], \"wei__date_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "name",
|
||||
"permanent": false,
|
||||
"description": "Modifier le nom du bus"
|
||||
@ -1825,7 +1825,7 @@
|
||||
],
|
||||
"query": "{\"pk\": [\"membership\", \"weimembership\", \"bus\", \"pk\"], \"wei__date_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "description",
|
||||
"permanent": false,
|
||||
"description": "Modifier la description du bus"
|
||||
@ -1841,7 +1841,7 @@
|
||||
],
|
||||
"query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Ajouter une équipe à mon bus"
|
||||
@ -1857,7 +1857,7 @@
|
||||
],
|
||||
"query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "name",
|
||||
"permanent": false,
|
||||
"description": "Modifier le nom d'une équipe de mon bus"
|
||||
@ -1873,7 +1873,7 @@
|
||||
],
|
||||
"query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "color",
|
||||
"permanent": false,
|
||||
"description": "Modifier la couleur d'une équipe de mon bus"
|
||||
@ -1889,7 +1889,7 @@
|
||||
],
|
||||
"query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "description",
|
||||
"permanent": false,
|
||||
"description": "Modifier la description d'une équipe de mon bus"
|
||||
@ -1905,7 +1905,7 @@
|
||||
],
|
||||
"query": "{\"pk\": [\"membership\", \"weimembership\", \"team\", \"pk\"], \"bus__wei__date_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "name",
|
||||
"permanent": false,
|
||||
"description": "Modifier le nom de mon équipe"
|
||||
@ -1921,7 +1921,7 @@
|
||||
],
|
||||
"query": "{\"pk\": [\"membership\", \"weimembership\", \"team\", \"pk\"], \"bus__wei__date_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "color",
|
||||
"permanent": false,
|
||||
"description": "Modifier la couleur de mon équipe"
|
||||
@ -1937,7 +1937,7 @@
|
||||
],
|
||||
"query": "{\"pk\": [\"membership\", \"weimembership\", \"team\", \"pk\"], \"bus__wei__date_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "description",
|
||||
"permanent": false,
|
||||
"description": "Modifier la description de mon équipe"
|
||||
@ -1967,7 +1967,7 @@
|
||||
"note",
|
||||
"transaction"
|
||||
],
|
||||
"query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": true}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": false}]]",
|
||||
"query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": false}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": true}]]",
|
||||
"type": "change",
|
||||
"mask": 2,
|
||||
"field": "valid",
|
||||
@ -1985,7 +1985,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "clothing_cut",
|
||||
"permanent": false,
|
||||
"description": "Modifier la coupe de vêtements d'une inscription WEI"
|
||||
@ -2017,7 +2017,7 @@
|
||||
],
|
||||
"query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "clothing_size",
|
||||
"permanent": false,
|
||||
"description": "Modifier la taille de vêtements d'une inscription WEI"
|
||||
@ -2225,7 +2225,7 @@
|
||||
],
|
||||
"query": "{}",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Créer une note d'utilisateur"
|
||||
@ -2257,7 +2257,7 @@
|
||||
],
|
||||
"query": "{}",
|
||||
"type": "view",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Voir toutes les notes de club"
|
||||
@ -2276,7 +2276,7 @@
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Voir tous les adhérents du club"
|
||||
"description": "Voir tous les adhérents de tous les clubs"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -2564,7 +2564,7 @@
|
||||
"mask": 3,
|
||||
"field": "inactivity_reason",
|
||||
"permanent": false,
|
||||
"description": "(Dé)bloquer sa propre note et modifier la raison"
|
||||
"description": "(Dé)bloquer n'importe quelle note et indiquer la raison"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -2607,7 +2607,7 @@
|
||||
"note",
|
||||
"transaction"
|
||||
],
|
||||
"query": "[\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": true}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": false}]",
|
||||
"query": "[\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": false}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": true}]",
|
||||
"type": "change",
|
||||
"mask": 2,
|
||||
"field": "valid",
|
||||
@ -2623,7 +2623,7 @@
|
||||
"note",
|
||||
"transaction"
|
||||
],
|
||||
"query": "[\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": true}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": false}]",
|
||||
"query": "[\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": false}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 5000]}, \"valid\": true}]",
|
||||
"type": "change",
|
||||
"mask": 2,
|
||||
"field": "invalidity_reason",
|
||||
@ -2641,7 +2641,7 @@
|
||||
],
|
||||
"query": "{\"club\": [\"club\"]}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "display_image",
|
||||
"permanent": false,
|
||||
"description": "Changer l'image de la note de son club"
|
||||
@ -2657,7 +2657,7 @@
|
||||
],
|
||||
"query": "{\"note__is_active\": true}",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Ajouter n'importe quel alias à une note non bloquée"
|
||||
@ -2753,7 +2753,7 @@
|
||||
],
|
||||
"query": "{\"profile__registration_valid\": false}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Modifier n'importe quel utilisateur non encore inscrit"
|
||||
@ -2769,7 +2769,7 @@
|
||||
],
|
||||
"query": "{\"registration_valid\": false}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Modifier n'importe quel profil non encore inscrit"
|
||||
@ -2865,7 +2865,7 @@
|
||||
],
|
||||
"query": "{}",
|
||||
"type": "change",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "display_image",
|
||||
"permanent": false,
|
||||
"description": "Changer l'image de n'importe quelle note"
|
||||
@ -2883,7 +2883,7 @@
|
||||
"type": "change",
|
||||
"mask": 3,
|
||||
"field": "is_active",
|
||||
"permanent": true,
|
||||
"permanent": false,
|
||||
"description": "(Dé)bloquer la note de son club manuellement"
|
||||
}
|
||||
},
|
||||
@ -2899,7 +2899,7 @@
|
||||
"type": "change",
|
||||
"mask": 3,
|
||||
"field": "inactivity_reason",
|
||||
"permanent": true,
|
||||
"permanent": false,
|
||||
"description": "(Dé)bloquer la note de son club et indiquer que cela a été fait manuellement"
|
||||
}
|
||||
},
|
||||
@ -2928,7 +2928,7 @@
|
||||
"application"
|
||||
],
|
||||
"query": "{\"user\": [\"user\"]}",
|
||||
"type": "create",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"field": "",
|
||||
"permanent": true,
|
||||
@ -2979,7 +2979,7 @@
|
||||
"type": "delete",
|
||||
"mask": 1,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"permanent": true,
|
||||
"description": "Supprimer une amitié à sa note"
|
||||
}
|
||||
},
|
||||
@ -3009,7 +3009,7 @@
|
||||
],
|
||||
"query": "{\"trusting__is_active\": true}",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 3,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Ajouter une amitié à une note non bloquée"
|
||||
@ -3073,12 +3073,28 @@
|
||||
],
|
||||
"query": "[\"AND\", {\"source__trusting__trusted\": [\"user\", \"note\"]}, [\"OR\", {\"source__balance__gte\": {\"F\": [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]]}}, {\"valid\": false}]]",
|
||||
"type": "add",
|
||||
"mask": 1,
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Transférer de l'argent depuis une note amie en restant positif"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "permission.permission",
|
||||
"pk": 197,
|
||||
"fields": {
|
||||
"model": [
|
||||
"note",
|
||||
"specialtransaction"
|
||||
],
|
||||
"query": "{\"source__notespecial__gte\":0}",
|
||||
"type": "add",
|
||||
"mask": 2,
|
||||
"field": "",
|
||||
"permanent": false,
|
||||
"description": "Créer un crédit quelconque"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "permission.role",
|
||||
"pk": 1,
|
||||
@ -3104,20 +3120,22 @@
|
||||
16,
|
||||
17,
|
||||
22,
|
||||
34,
|
||||
48,
|
||||
52,
|
||||
126,
|
||||
161,
|
||||
162,
|
||||
165,
|
||||
179,
|
||||
186,
|
||||
187,
|
||||
188,
|
||||
189,
|
||||
190,
|
||||
191,
|
||||
195,
|
||||
196
|
||||
190,
|
||||
191,
|
||||
195,
|
||||
196
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -3129,11 +3147,9 @@
|
||||
"name": "Adh\u00e9rent Kfet",
|
||||
"permissions": [
|
||||
22,
|
||||
34,
|
||||
36,
|
||||
39,
|
||||
40,
|
||||
70,
|
||||
78,
|
||||
79,
|
||||
83,
|
||||
@ -3157,10 +3173,7 @@
|
||||
157,
|
||||
158,
|
||||
159,
|
||||
160,
|
||||
179,
|
||||
189,
|
||||
190
|
||||
160
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -3197,9 +3210,7 @@
|
||||
"for_club": null,
|
||||
"name": "Pr\u00e9sident\u00b7e de club",
|
||||
"permissions": [
|
||||
50,
|
||||
62,
|
||||
141,
|
||||
142
|
||||
]
|
||||
}
|
||||
@ -3211,23 +3222,17 @@
|
||||
"for_club": null,
|
||||
"name": "Tr\u00e9sorier\u00b7\u00e8re de club",
|
||||
"permissions": [
|
||||
59,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
27,
|
||||
59,
|
||||
60,
|
||||
61,
|
||||
62,
|
||||
127,
|
||||
133,
|
||||
136,
|
||||
141,
|
||||
142,
|
||||
150,
|
||||
166,
|
||||
167,
|
||||
168,
|
||||
182,
|
||||
184,
|
||||
185
|
||||
@ -3246,7 +3251,16 @@
|
||||
26,
|
||||
27,
|
||||
30,
|
||||
33
|
||||
33,
|
||||
41,
|
||||
42,
|
||||
63,
|
||||
66,
|
||||
135,
|
||||
136,
|
||||
137,
|
||||
150,
|
||||
172
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -3268,6 +3282,10 @@
|
||||
31,
|
||||
32,
|
||||
33,
|
||||
37,
|
||||
38,
|
||||
41,
|
||||
42,
|
||||
43,
|
||||
51,
|
||||
53,
|
||||
@ -3283,6 +3301,7 @@
|
||||
67,
|
||||
68,
|
||||
69,
|
||||
70,
|
||||
71,
|
||||
72,
|
||||
73,
|
||||
@ -3297,12 +3316,12 @@
|
||||
143,
|
||||
146,
|
||||
147,
|
||||
148,
|
||||
149,
|
||||
150,
|
||||
151,
|
||||
163,
|
||||
164,
|
||||
170,
|
||||
171,
|
||||
172,
|
||||
173,
|
||||
174,
|
||||
@ -3310,10 +3329,7 @@
|
||||
176,
|
||||
177,
|
||||
178,
|
||||
188,
|
||||
183,
|
||||
186,
|
||||
187
|
||||
183
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -3508,13 +3524,13 @@
|
||||
187,
|
||||
188,
|
||||
189,
|
||||
190,
|
||||
191,
|
||||
192,
|
||||
193,
|
||||
194,
|
||||
195,
|
||||
196
|
||||
190,
|
||||
191,
|
||||
192,
|
||||
193,
|
||||
194,
|
||||
195,
|
||||
196
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -3525,12 +3541,6 @@
|
||||
"for_club": 2,
|
||||
"name": "GC Kfet",
|
||||
"permissions": [
|
||||
32,
|
||||
56,
|
||||
58,
|
||||
55,
|
||||
57,
|
||||
52,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
@ -3540,20 +3550,16 @@
|
||||
29,
|
||||
30,
|
||||
31,
|
||||
70,
|
||||
72,
|
||||
143,
|
||||
32,
|
||||
37,
|
||||
38,
|
||||
41,
|
||||
43,
|
||||
148,
|
||||
149,
|
||||
166,
|
||||
167,
|
||||
168,
|
||||
170,
|
||||
171,
|
||||
176,
|
||||
177,
|
||||
178,
|
||||
179,
|
||||
180,
|
||||
181,
|
||||
182
|
||||
]
|
||||
}
|
||||
@ -3565,6 +3571,9 @@
|
||||
"for_club": 2,
|
||||
"name": "Res[pot]",
|
||||
"permissions": [
|
||||
19,
|
||||
25,
|
||||
26,
|
||||
37,
|
||||
38,
|
||||
41,
|
||||
@ -3587,6 +3596,8 @@
|
||||
"name": "GC WEI",
|
||||
"permissions": [
|
||||
22,
|
||||
70,
|
||||
72,
|
||||
76,
|
||||
85,
|
||||
86,
|
||||
@ -3608,8 +3619,8 @@
|
||||
111,
|
||||
112,
|
||||
113,
|
||||
130,
|
||||
131
|
||||
128,
|
||||
130
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -3622,12 +3633,13 @@
|
||||
"permissions": [
|
||||
22,
|
||||
84,
|
||||
115,
|
||||
117,
|
||||
118,
|
||||
119,
|
||||
120,
|
||||
121,
|
||||
122,
|
||||
115
|
||||
122
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -3688,18 +3700,7 @@
|
||||
"name": "Adhérent WEI",
|
||||
"permissions": [
|
||||
77,
|
||||
87,
|
||||
90,
|
||||
93,
|
||||
95,
|
||||
97,
|
||||
99,
|
||||
101,
|
||||
108,
|
||||
109,
|
||||
114,
|
||||
128,
|
||||
130
|
||||
114
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -3710,6 +3711,9 @@
|
||||
"for_club": 1,
|
||||
"name": "Secrétaire BDE",
|
||||
"permissions": [
|
||||
37,
|
||||
41,
|
||||
53,
|
||||
54,
|
||||
55,
|
||||
56,
|
||||
@ -3718,15 +3722,21 @@
|
||||
135,
|
||||
136,
|
||||
137,
|
||||
138,
|
||||
139,
|
||||
140,
|
||||
143,
|
||||
145,
|
||||
146,
|
||||
147,
|
||||
148,
|
||||
149,
|
||||
150,
|
||||
176,
|
||||
177
|
||||
177,
|
||||
180,
|
||||
181,
|
||||
183
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -3738,20 +3748,16 @@
|
||||
"name": "PC Kfet",
|
||||
"permissions": [
|
||||
6,
|
||||
22,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
30,
|
||||
34,
|
||||
49,
|
||||
50,
|
||||
55,
|
||||
56,
|
||||
57,
|
||||
58,
|
||||
70,
|
||||
72,
|
||||
135,
|
||||
137,
|
||||
143,
|
||||
@ -3762,8 +3768,7 @@
|
||||
168,
|
||||
176,
|
||||
177,
|
||||
180,
|
||||
181
|
||||
197
|
||||
]
|
||||
}
|
||||
},
|
||||
|
19
apps/permission/migrations/0002_club_not_required.py
Normal file
19
apps/permission/migrations/0002_club_not_required.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 2.2.28 on 2023-07-24 10:15
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('permission', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='role',
|
||||
name='for_club',
|
||||
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.PROTECT, to='member.Club', verbose_name='for club'),
|
||||
),
|
||||
]
|
@ -339,6 +339,7 @@ class Role(models.Model):
|
||||
"member.Club",
|
||||
verbose_name=_("for club"),
|
||||
on_delete=models.PROTECT,
|
||||
blank=True,
|
||||
null=True,
|
||||
default=None,
|
||||
)
|
||||
|
@ -310,8 +310,8 @@ class SogeCredit(models.Model):
|
||||
amount = sum(transaction.total for transaction in self.transactions.all())
|
||||
if 'wei' in settings.INSTALLED_APPS:
|
||||
from wei.models import WEIMembership
|
||||
if not WEIMembership.objects.filter(club__weiclub__year=datetime.date.today().year, user=self.user)\
|
||||
.exists():
|
||||
if not WEIMembership.objects\
|
||||
.filter(club__weiclub__year=self.credit_transaction.created_at.year, user=self.user).exists():
|
||||
# 80 € for people that don't go to WEI
|
||||
amount += 8000
|
||||
return amount
|
||||
@ -329,17 +329,18 @@ class SogeCredit(models.Model):
|
||||
bde_qs = Membership.objects.filter(user=self.user, club=bde, date_start__gte=bde.membership_start)
|
||||
kfet_qs = Membership.objects.filter(user=self.user, club=kfet, date_start__gte=kfet.membership_start)
|
||||
|
||||
if bde_qs.exists():
|
||||
m = bde_qs.get()
|
||||
if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
||||
if m.transaction not in self.transactions.all():
|
||||
self.transactions.add(m.transaction)
|
||||
|
||||
if kfet_qs.exists():
|
||||
m = kfet_qs.get()
|
||||
if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
||||
if m.transaction not in self.transactions.all():
|
||||
self.transactions.add(m.transaction)
|
||||
## Soge do not pay BDE and kfet memberships this year (2022-2023)
|
||||
# if bde_qs.exists():
|
||||
# m = bde_qs.get()
|
||||
# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
||||
# if m.transaction not in self.transactions.all():
|
||||
# self.transactions.add(m.transaction)
|
||||
#
|
||||
# if kfet_qs.exists():
|
||||
# m = kfet_qs.get()
|
||||
# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership
|
||||
# if m.transaction not in self.transactions.all():
|
||||
# self.transactions.add(m.transaction)
|
||||
|
||||
if 'wei' in settings.INSTALLED_APPS:
|
||||
from wei.models import WEIClub
|
||||
|
@ -108,7 +108,7 @@ class InvoiceListView(LoginRequiredMixin, SingleTableView):
|
||||
name="",
|
||||
address="",
|
||||
)
|
||||
if not PermissionBackend.check_perm(self.request, "treasury.add_invoice", sample_invoice):
|
||||
if not PermissionBackend.check_perm(self.request, "treasury.view_invoice", sample_invoice):
|
||||
raise PermissionDenied(_("You are not able to see the treasury interface."))
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
|
@ -14,14 +14,17 @@ from .base import WEISurvey, WEISurveyInformation, WEISurveyAlgorithm, WEIBusInf
|
||||
from ...models import WEIMembership
|
||||
|
||||
WORDS = [
|
||||
'13 organisé', '3ième mi temps', 'Années 2000', 'Apéro', 'BBQ', 'BP', 'Beauf', 'Binge drinking', 'Bon enfant',
|
||||
'Cartouche', 'Catacombes', 'Chansons paillardes', 'Chansons populaires', 'Chanteur', 'Chartreuse', 'Chill',
|
||||
'Core', 'DJ', 'Dancefloor', 'Danse', 'David Guetta', 'Disco', 'Eau de vie', 'Électro', 'Escalade', 'Familial',
|
||||
'Fanfare', 'Fracassage', 'Féria', 'Hard rock', 'Hoeggarden', 'House', 'Huit-six', 'IPA', 'Inclusif', 'Inferno',
|
||||
'Introverti', 'Jager bomb', 'Jazz', 'Jeux d\'alcool', 'Jeux de rôles', 'Jeux vidéo', 'Jul', 'Jus de fruit',
|
||||
'Karaoké', 'LGBTQI+', 'Lady Gaga', 'Loup garou', 'Morning beer', 'Métal', 'Nuit blanche', 'Ovalie', 'Psychedelic',
|
||||
'Pétanque', 'Rave', 'Reggae', 'Rhum', 'Ricard', 'Rock', 'Rosé', 'Rétro', 'Séducteur', 'Techno', 'Thérapie taxi',
|
||||
'Théâtre', 'Trap', 'Turn up', 'Underground', 'Volley', 'Wati B', 'Zinédine Zidane',
|
||||
'ABBA', 'After', 'Alcoolique anonyme', 'Ambiance festive', 'Années 2000', 'Apéro', 'Art',
|
||||
'Baby foot billard biere pong', 'BBQ', 'Before', 'Bière pong', 'Bon enfant', 'Calme', 'Canapé',
|
||||
'Chanson paillarde', 'Chanson populaire', 'Chartreuse', 'Cheerleader', 'Chill', 'Choré',
|
||||
'Cinéma', 'Cocktail', 'Comédie musicle', 'Commercial', 'Copaing', 'Danse', 'Dancefloor',
|
||||
'Electro', 'Fanfare', 'Gin tonic', 'Inclusif', 'Jazz', "Jeux d'alcool", 'Jeux de carte',
|
||||
'Jeux de rôle', 'Jeux de société', 'JUL', 'Jus de fruit', 'Kfet', 'Kleptomanie assurée',
|
||||
'LGBTQ+', 'Livre', 'Morning beer', 'Musique', 'NAPS', 'Paillettes', 'Pastis', 'Paté Hénaff',
|
||||
'Peluche', 'Pena baiona', "Peu d'alcool", 'Pilier de bar', 'PMU', 'Poulpe', 'Punch', 'Rap',
|
||||
'Réveil', 'Rock', 'Rugby', 'Sandwich', 'Serge', 'Shot', 'Sociable', 'Spectacle', 'Techno',
|
||||
'Techno house', 'Thérapie Taxi', 'Tradition kchanaises', 'Troisième mi-temps', 'Turn up',
|
||||
'Vodka', 'Vodka pomme', 'Volley', 'Vomi stratégique'
|
||||
]
|
||||
|
||||
|
||||
|
@ -252,7 +252,7 @@ REST_FRAMEWORK = {
|
||||
'rest_framework.authentication.TokenAuthentication',
|
||||
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
|
||||
],
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'DEFAULT_PAGINATION_CLASS': 'apps.api.pagination.CustomPagination',
|
||||
'PAGE_SIZE': 20,
|
||||
}
|
||||
|
||||
|
@ -23,11 +23,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{{ profile_form|crispy }}
|
||||
{{ soge_form|crispy }}
|
||||
{% comment "Soge not for membership (only WEI)" %} {{ soge_form|crispy }} {% endcomment %}
|
||||
<button class="btn btn-success" type="submit">
|
||||
{% trans "Sign up" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user