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

Fix permissions on team authorizations

This commit is contained in:
ynerant 2021-02-13 17:09:08 +01:00
parent 140048bcdb
commit 6c064d6570
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -375,7 +375,7 @@ class TeamAuthorizationsView(LoginRequiredMixin, DetailView):
return super().handle_no_permission()
if user.registration.is_admin or user.registration.participates and user.registration.team.pk == kwargs["pk"] \
or user.registration.is_volunteer \
and self.object.participation.tournament in user.registration.interesting_tournaments:
and self.get_object().participation.tournament in user.registration.interesting_tournaments:
return super().dispatch(request, *args, **kwargs)
raise PermissionDenied