mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-08-16 22:10:05 +02:00
Juries can't download ZIP archives with authorizations
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@@ -392,9 +392,9 @@ class TeamAuthorizationsView(LoginRequiredMixin, DetailView):
|
||||
if not user.is_authenticated:
|
||||
return super().handle_no_permission()
|
||||
if user.registration.is_admin or user.registration.is_volunteer \
|
||||
and (self.get_object().participation.tournament in user.registration.interesting_tournaments
|
||||
and (user.registration in self.get_object().participation.tournament.organizers
|
||||
or self.get_object().participation.final
|
||||
and Tournament.final_tournament() in user.registration.interesting_tournaments):
|
||||
and user.registration in Tournament.final_tournament().organizers):
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
raise PermissionDenied
|
||||
|
||||
|
Reference in New Issue
Block a user