Fix permissions on team authorizations
This commit is contained in:
parent
140048bcdb
commit
6c064d6570
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue