diff --git a/stages/views/__init__.py b/stages/views/__init__.py index 1d8637d..180a32c 100644 --- a/stages/views/__init__.py +++ b/stages/views/__init__.py @@ -5,6 +5,7 @@ from collections import OrderedDict from datetime import date, datetime, timedelta from django.contrib import messages +from django.contrib.auth.mixins import PermissionRequiredMixin from django.core.mail import EmailMessage from django.db.models import Count from django.http import HttpResponse, HttpResponseNotAllowed, HttpResponseRedirect @@ -181,6 +182,7 @@ class AttributionView(TemplateView): When a student is chosen; * details of a student: StudentSummaryView """ + permission_required = 'stages.change_training' template_name = 'attribution.html' def get_context_data(self, **kwargs): diff --git a/templates/admin/index.html b/templates/admin/index.html index d42f43c..10dac19 100644 --- a/templates/admin/index.html +++ b/templates/admin/index.html @@ -67,20 +67,26 @@ document.addEventListener("DOMContentLoaded", function(event) { {% endfor %} -{% else %} -

{% trans "You don't have permission to edit anything." %}

{% endif %} {% endblock %} {% block sidebar %}