mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 18:22:23 +00:00
Must be authenticated to upload notes
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
3d7a39a593
commit
80f0baac1e
@ -797,9 +797,10 @@ class PoolUploadNotesView(VolunteerMixin, FormView, DetailView):
|
|||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
self.object = self.get_object()
|
self.object = self.get_object()
|
||||||
|
|
||||||
if request.user.registration.is_admin or request.user.registration.is_volunteer \
|
if request.user.is_authenticated and \
|
||||||
and (self.object.tournament in request.user.registration.organized_tournaments.all()
|
(request.user.registration.is_admin or request.user.registration.is_volunteer
|
||||||
or request.user.registration in self.object.juries.all()):
|
and (self.object.tournament in request.user.registration.organized_tournaments.all()
|
||||||
|
or request.user.registration in self.object.juries.all())):
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
return self.handle_no_permission()
|
return self.handle_no_permission()
|
||||||
|
Loading…
Reference in New Issue
Block a user