From 1fe097ca8603c2f1e0757f1a617c5a7c79defb79 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 17 Jan 2024 11:16:43 -0500 Subject: [PATCH] membershipworks: Require "view EventExt" permission for upcoming events --- membershipworks/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/membershipworks/views.py b/membershipworks/views.py index 1a20627..229e3de 100644 --- a/membershipworks/views.py +++ b/membershipworks/views.py @@ -2,7 +2,7 @@ from datetime import datetime from django.conf import settings from django.contrib import messages -from django.contrib.auth.decorators import login_required +from django.contrib.auth.decorators import permission_required from django.contrib.auth.mixins import PermissionRequiredMixin from django.shortcuts import render from django.views.generic.dates import MonthArchiveView @@ -24,8 +24,7 @@ class MemberAutocomplete(autocomplete.Select2QuerySetView): return super().get_queryset() -@login_required -# TODO: permission required? +@permission_required("membershipworks.view_eventext") def upcoming_events(request): now = datetime.now()