Private
Public Access
1
0

permissions

This commit is contained in:
Sander Roosendaal
2016-12-14 22:55:23 +01:00
parent b4d7db324e
commit 170d0e43a1
2 changed files with 2 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ class IsOwnerOrReadOnly(permissions.BasePermission):
return True
# Write permissions are only allowed to the owner of the snippet.
return obj.owner == request.user
return obj.user == request.user
class IsOwnerOrNot(permissions.BasePermission):
def has_object_permission(self, request, view, obj):