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:
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
Block a user