1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 06:22:22 +00:00

Organizers can edit payments

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-03-29 17:44:38 +01:00
parent 5084bb65d9
commit a44439671e
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -453,7 +453,7 @@ class PaymentUpdateView(LoginRequiredMixin, UpdateView):
object = self.get_object()
if not user.is_authenticated or \
not user.registration.is_admin \
and (user.registration.is_volunteer and user.registration in object.tournament.organizers.all()
and (user.registration.is_volunteer and user.registration not in object.tournament.organizers.all()
or user.registration.is_student and user.registration not in object.registrations.all()
or user.registration.is_coach and user.registration.team != object.team):
return self.handle_no_permission()