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
1 changed files with 2 additions and 1 deletions

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()),