mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 06:22:22 +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):
|
||||
self.object = self.get_object()
|
||||
|
||||
if request.user.registration.is_admin or request.user.registration.is_volunteer \
|
||||
if request.user.is_authenticated and \
|
||||
(request.user.registration.is_admin or request.user.registration.is_volunteer
|
||||
and (self.object.tournament in request.user.registration.organized_tournaments.all()
|
||||
or request.user.registration in self.object.juries.all()):
|
||||
or request.user.registration in self.object.juries.all())):
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
return self.handle_no_permission()
|
||||
|
Loading…
Reference in New Issue
Block a user