This commit is contained in:
Ross
2021-02-06 22:45:38 +00:00
parent 761354525d
commit 3712cf15fc
6 changed files with 160 additions and 96 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ from .models import Long
def user_is_author_or_long_checker(function):
def wrap(request, *args, **kwargs):
long = Long.objects.get(pk=kwargs['pk'])
if request.user in long.author.all() or request.user.groups.filter(name='long_checker').exists():
if request.user in long.author.all() or request.user.groups.filter(name='long_checker').exists() or request.user.is_superuser:
return function(request, *args, **kwargs)
else:
raise PermissionDenied
+1 -1
View File
@@ -19,7 +19,7 @@
<ol id="full-question-list">
{% for question in questions.all %}
<li>
<li data-question-id={{question.pk}}>
History: {{ question.history}}
<br />
{% for series in question.series.all %}