Fix: Fix permission check for tastypie / update to 0.14.1

This commit is contained in:
winkidney
2018-08-26 03:35:14 -07:00
parent 913a0ba08d
commit fe1439b2a2
5 changed files with 81 additions and 40 deletions

View File

@@ -33,11 +33,3 @@ class CombinedAuthBackend(object):
return User.objects.get(pk=user_id)
except User.DoesNotExist:
return None
def has_perm(self, user, perm, obj=None):
"""
A very simplistic authorization mechanism for now. Basically a pin owner can do anything with the pin.
"""
if obj and isinstance(obj, Pin):
return obj.submitter == user
return False