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