mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-22 17:41:25 +00:00
Compare commits
16 Commits
7a0cb64fb6
...
6c064d6570
Author | SHA1 | Date | |
---|---|---|---|
6c064d6570 | |||
140048bcdb | |||
|
73cadd8cfd | ||
|
12acb0ca26 | ||
|
a846750911 | ||
|
a8a69c766c | ||
|
9c4e68d0ea | ||
|
e2d5a55173 | ||
|
1b117e9289 | ||
|
629c4d2367 | ||
|
f83b4c094e | ||
|
8162a48754 | ||
|
68a5467a35 | ||
|
4c476a50ea | ||
|
641e53e617 | ||
|
75db278a97 |
@ -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
|
||||
|
||||
|
@ -244,7 +244,7 @@ class UserDetailView(LoginRequiredMixin, DetailView):
|
||||
and user.registration.participates and user.registration.team \
|
||||
and user.registration.team.participation.tournament in me.registration.organized_tournaments.all() \
|
||||
or user.registration.is_volunteer and me.registration.is_volunteer \
|
||||
and me.registration.interesting_tournaments.intersection(user.registration.intersting_tournaments):
|
||||
and me.registration.interesting_tournaments.intersection(user.registration.interesting_tournaments):
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
raise PermissionDenied
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user