From 9d741d76f2685d833380f83ad1a7afacc294ea1f Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 6 Apr 2021 19:50:27 +0200 Subject: [PATCH] Organizers can see solutions --- apps/registration/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/registration/views.py b/apps/registration/views.py index f63a5a3..4564d75 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -549,7 +549,10 @@ class SolutionView(LoginRequiredMixin, View): solution_number=solution.problem) else: passage_participant_qs = Passage.objects.none() - if not (user.registration.is_admin or user.registration.is_volunteer + if not (user.registration.is_admin + or user.registration.is_volunteer and user.registration + in solution.participation.tournament.organizers.all() + or user.registration.is_volunteer and Passage.objects.filter(Q(pool__juries=user.registration) | Q(pool__tournament__in=user.registration.organized_tournaments.all()), defender=solution.participation,