Commit aed0dc81 authored by Hamza Dely's avatar Hamza Dely

[consos/views] Retire des vérifications de droits superflues

parent cd598294
......@@ -407,9 +407,6 @@ class NoteViewSet(viewsets.GenericViewSet):
- être envoyées via une requête PATCH
- contenir un paramètre 'soft_lock' pouvant valoir 'true' ou 'false'
"""
if not request.user.has_perm("consos.note_soft_lock", Acl.LIMITE):
return Response({}, status=status.HTTP_403_FORBIDDEN)
note = self.get_object()
if (note.adherent != request.user
and not request.user.has_perm("consos.note_soft_lock", Acl.TOTAL)):
......@@ -445,9 +442,6 @@ class NoteViewSet(viewsets.GenericViewSet):
- être envoyées via une requête PATCH
- contenir un paramètre 'hard_lock' pouvant valoir 'true' ou 'false'
"""
if not request.user.has_perm("consos.note_hard_lock", Acl.BASIQUE):
return Response({}, status=status.HTTP_403_FORBIDDEN)
note = self.get_object()
if (note.adherent.type != note.adherent.PERSONNE
and not request.user.has_perm("consos.note_hard_lock", Acl.TOTAL)):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment