.
This commit is contained in:
+3
-2
@@ -101,8 +101,9 @@ def question_list(request):
|
||||
def question_detail(request, pk):
|
||||
question = get_object_or_404(AnatomyQuestion, pk=pk)
|
||||
|
||||
if not question.open_access and (not request.user.groups.filter(name="anatomy_checker").exists() and request.user not in question.author.all()):
|
||||
raise PermissionDenied()
|
||||
if not question.open_access
|
||||
if not request.user.groups.filter(name="anatomy_checker").exists() and request.user not in question.author.all():
|
||||
raise PermissionDenied()
|
||||
|
||||
return render(request, "anatomy/question_detail.html", {"question": question})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user