Commit 7ad56b86 authored by Tom van Bussel's avatar Tom van Bussel
Browse files

Allow event cancellations when member has a fine

parent 39f389ff
......@@ -23,7 +23,7 @@ def event_permissions(member, event):
"cancel_registration": False,
"update_registration": False,
}
if member and member.is_authenticated and member.can_attend_events:
if member and member.is_authenticated:
registration = None
try:
registration = Registration.objects.get(
......@@ -35,15 +35,18 @@ def event_permissions(member, event):
perms["create_registration"] = (
(registration is None or registration.date_cancelled is not None)
and event.registration_allowed)
and event.registration_allowed and
member.can_attend_events)
perms["cancel_registration"] = (
registration is not None and
registration.date_cancelled is None and
event.cancellation_allowed)
perms["update_registration"] = (
registration is not None and
registration.date_cancelled is None and event.has_fields() and
event.registration_allowed)
registration.date_cancelled is None and
event.has_fields() and
event.registration_allowed and
member.can_attend_events)
return perms
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment