Commit 8e8ee808 authored by Sli's avatar Sli
Browse files

Fixed api permissions

parent 2822d947
Pipeline #100 failed with stage
in 1 minute and 47 seconds
......@@ -24,7 +24,7 @@ class RightManagedModelViewSet(viewsets.ModelViewSet):
if (request.method == 'GET' and can_view(obj, user)):
return res
elif (request.method == 'PUSH' and can_edit(obj, user)):
elif (request.method != 'GET' and can_edit(obj, user)):
return res
except: pass # To prevent bug with Anonymous user
raise PermissionDenied
Supports Markdown
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