Limit access to training pages to authorized users

This commit is contained in:
Claude Paroz 2019-02-21 09:51:14 +01:00
parent 3afdfaee59
commit c8cce83aa3
2 changed files with 11 additions and 5 deletions

View file

@ -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):