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

View File

@ -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,