.
This commit is contained in:
@@ -1,13 +1 @@
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from .models import ExamBase
|
||||
|
||||
#def user_is_exam_author_or_exam_checker(function):
|
||||
# def wrap(request, *args, **kwargs):
|
||||
# exam = Exam.objects.get(pk=kwargs['pk'])
|
||||
# if request.user in exam.author.all() or request.user.groups.filter(name='exam_checker').exists():
|
||||
# return function(request, *args, **kwargs)
|
||||
# else:
|
||||
# raise PermissionDenied
|
||||
# wrap.__doc__ = function.__doc__
|
||||
# #wrap.__name__ = function.__name__
|
||||
# return wrap
|
||||
@@ -23,8 +23,6 @@ from .forms import (
|
||||
ExaminationForm,
|
||||
)
|
||||
|
||||
from .decorators import user_is_exam_author_or_exam_checker
|
||||
|
||||
from .models import Examination
|
||||
|
||||
from rapids.models import Rapid as RapidQuestion
|
||||
|
||||
Reference in New Issue
Block a user