This commit is contained in:
Ross
2021-09-25 21:01:09 +01:00
parent ba9e09dbba
commit 41db98454b
3 changed files with 1 additions and 13 deletions
-11
View File
@@ -106,17 +106,6 @@ def question_list(request):
return render(request, "anatomy/question_list.html", {"questions": questions})
@login_required
def question_detail(request, pk):
question = get_object_or_404(AnatomyQuestion, pk=pk)
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})
@login_required
def answer_question(request, pk):