Commit 3e3d2571 by Dan Krause

Merge pull request #104 from dankrause/master

Set an ACL on ParseResource by default
parents fc8a5345 eb437d98
......@@ -255,6 +255,8 @@ class ACL(ParseType):
def __init__(self, acl=None):
self._acl = acl or {}
if acl is None:
self.set_default(read=True, write=True)
def _to_native(self):
return self._acl
......@@ -317,6 +319,8 @@ class ParseResource(ParseBase):
def __init__(self, **kw):
self.objectId = None
self._init_attrs(kw)
if 'ACL' not in kw:
self.ACL = ACL()
def __getattr__(self, attr):
# if object is not loaded and attribute is missing, try to load it
......
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