1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-02-15 12:41:18 +00:00

Compare commits

...

5 Commits

Author SHA1 Message Date
nicomarg
bbcecf1f6d Merge branch 'non-BDE-members' into 'main'
Draft: Allow non-BDE members to use the note

See merge request bde/nk20!268
2024-08-30 00:43:17 +02:00
nicomarg
361de9f8b4 more bug fixing 2024-08-29 21:06:34 +02:00
nicomarg
e2426bd6a6 Bugfix 2024-08-29 20:03:43 +02:00
nicomarg
7fea619a9f add permission to make transfers with members of your club 2024-08-29 20:02:06 +02:00
nicomarg
7b5eefcc0a Update 2 files
- /apps/registration/views.py
- /apps/permission/fixtures/initial.json
2024-08-29 19:23:26 +02:00
2 changed files with 37 additions and 3 deletions

View File

@ -3752,6 +3752,22 @@
"description": "Modifier bouffe" "description": "Modifier bouffe"
} }
}, },
{
"model": "permission.permission",
"pk": 239,
"fields": {
"model": [
"note",
"alias"
],
"query": "[\"AND\", [\"OR\", {\"note__noteuser__user__memberships__club\": [\"club\"], \"note__noteuser__user__memberships__date_start__lte\": [\"today\"], \"note__noteuser__user__memberships__date_end__gte\": [\"today\"]}, {\"note__noteclub__isnull\": false}], {\"note__is_active\": true}]",
"type": "view",
"mask": 1,
"field": "",
"permanent": false,
"description": "Voir les alias des notes des clubs et des adhérent⋅es du club"
}
},
{ {
"model": "permission.role", "model": "permission.role",
"pk": 1, "pk": 1,
@ -3851,6 +3867,19 @@
"for_club": null, "for_club": null,
"name": "Membre de club", "name": "Membre de club",
"permissions": [ "permissions": [
1,
2,
3,
4,
5,
7,
8,
9,
10,
11,
12,
13,
14,
22 22
] ]
} }
@ -3913,7 +3942,8 @@
142, 142,
182, 182,
184, 184,
185 185,
239
] ]
} }
}, },

View File

@ -300,9 +300,13 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin,
# join_bde = True # join_bde = True
# join_kfet = True # join_kfet = True
if not join_bde: if not (join_bde or any(b for _, b in join_clubs)):
# This software belongs to the BDE. # This software belongs to the BDE.
form.add_error('join_bde', _("You must join the BDE.")) form.add_error('join_bde', _("You must join a club."))
return super().form_invalid(form)
if join_kfet and not join_bde:
form.add_error('join_bde', _("You must also join the parent club BDE."))
return super().form_invalid(form) return super().form_invalid(form)
# Calculate required registration fee # Calculate required registration fee