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

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