From 68bff2bc1692d554f36176bdc5a9a1861f9085bf Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 22 Apr 2021 17:18:11 +0100 Subject: [PATCH] . --- anatomy/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anatomy/views.py b/anatomy/views.py index 693bf3de..0c37df3c 100644 --- a/anatomy/views.py +++ b/anatomy/views.py @@ -101,7 +101,7 @@ 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() : + if not question.open_access and (not request.user.groups.filter(name="anatomy_checker").exists() and request.user not in question.author): raise PermissionDenied() return render(request, "anatomy/question_detail.html", {"question": question})