1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-26 06:22:22 +00:00

Organizers can see solutions

This commit is contained in:
Yohann D'ANELLO 2021-04-06 19:50:27 +02:00
parent de504a1706
commit 9d741d76f2
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -549,7 +549,10 @@ class SolutionView(LoginRequiredMixin, View):
solution_number=solution.problem) solution_number=solution.problem)
else: else:
passage_participant_qs = Passage.objects.none() 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) and Passage.objects.filter(Q(pool__juries=user.registration)
| Q(pool__tournament__in=user.registration.organized_tournaments.all()), | Q(pool__tournament__in=user.registration.organized_tournaments.all()),
defender=solution.participation, defender=solution.participation,