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()