From 5acc74682ddc5efdf731a30d04dede9a23c6db79 Mon Sep 17 00:00:00 2001 From: Felix Rindt Date: Thu, 12 Dec 2024 13:13:45 +0100 Subject: [PATCH] fix event change permission check --- ephios/core/templates/core/event_detail.html | 5 +---- ephios/core/views/event.py | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ephios/core/templates/core/event_detail.html b/ephios/core/templates/core/event_detail.html index e300c9c10..8ba5d6bb0 100644 --- a/ephios/core/templates/core/event_detail.html +++ b/ephios/core/templates/core/event_detail.html @@ -20,9 +20,6 @@ {% endblock %} {% block content %} - {% if request.user.is_authenticated %} - {% get_obj_perms request.user for event as "event_perms" %} - {% endif %} {% if not event.active %} {% if event.shifts.exists %} {% translate "This event has not been saved! If you are done editing the event, you can save it." as not_active_error %} @@ -40,7 +37,7 @@

- {% if "change_event" in event_perms %} + {% if can_change_event %}