Fix permission to download all authorizations of a tournament

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-04-25 12:42:37 +02:00
parent 0bc5ef0a7f
commit a594b268ea
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 1 deletions

View File

@ -391,7 +391,7 @@ class TeamAuthorizationsView(LoginRequiredMixin, View):
tournament = Tournament.objects.get(pk=kwargs["tournament_id"])
if user.registration.is_admin or user.registration.is_volunteer \
and (user.registration in tournament.organizers
and (user.registration in tournament.organizers.all()
or (team is not None and team.participation.final
and user.registration in Tournament.final_tournament().organizers)):
return super().dispatch(request, *args, **kwargs)