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

Fix permissions for solutions for the final

This commit is contained in:
Yohann D'ANELLO 2021-05-11 17:06:49 +02:00
parent 384fbfd0b2
commit 837800345b
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -553,7 +553,8 @@ class SolutionView(LoginRequiredMixin, View):
passage_participant_qs = Passage.objects.none()
if not (user.registration.is_admin
or user.registration.is_volunteer and user.registration
in solution.participation.tournament.organizers.all()
in (solution.participation.tournament
if not solution.final_solution else Tournament.final_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()),