.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user