mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-26 03:57:41 +02:00
Final organizers can see the team information
This commit is contained in:
@ -156,6 +156,8 @@ class TeamDetailView(LoginRequiredMixin, DetailView):
|
||||
"""
|
||||
if not request.user.is_authenticated or \
|
||||
(not request.user.admin and self.request.user not in self.get_object().tournament.organizers.all()
|
||||
and not (self.get_object().selected_for_final
|
||||
and request.user in Tournament.get_final().organizers.all())
|
||||
and self.get_object() != request.user.team):
|
||||
raise PermissionDenied
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
Reference in New Issue
Block a user