Attempt to set ACL returns "object has no attribute 'ACL'"
See original GitHub issue answer.User = user
answer.ACL.set_user(user, read=True, write=True)
answer.ACL.set_default(read=True)
answer.ACL.set_role('admin', read=True, write=True)
answer.save();
returns:
Traceback (most recent call last): File “./fix_Question.py”, line 32, in <module> answer.ACL.set_user(user, read=True, write=True) File “/usr/local/lib/python2.7/dist-packages/parse_rest-0.2.20141004-py2.7.egg/parse_rest/datatypes.py”, line 326, in getattr return object.getattribute(self, attr) #preserve default if attr not exists AttributeError: ‘Question’ object has no attribute ‘ACL’
Issue Analytics
- State:
- Created 9 years ago
- Comments:9
Top Results From Across the Web
AttributeError: 'NoneType' object has no attribute 'set_acl'
The only way that could happen is if the call to bucket.lookup fails to find the specified object in this bucket.
Read more >How to take ownership and change permissions for blocked ...
Attributes -match "Directory") { # New, blank Directory ACL with only Owner set $blankdirAcl = New-Object System.Security.AccessControl.
Read more >get-object-acl — AWS CLI 1.27.34 Command Reference
Returns the access control list (ACL) of an object. To use this operation, you must have s3:GetObjectAcl permissions or READ_ACP access to the...
Read more >Documentum Access Control Lists - ArgonDigital
When a user attempts to access an object, the Documentum Server looks in the ACL to determine which groups have access.
Read more >Command Line-Version (SetACL.exe) – Syntax and Description
Action (-actn): What should SetACL do with the object specified? Example: SetACL.exe -on c:\Windows -ot file -actn list. This lists the permissions ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is indeed a bug that happens when first trying to set the ACL for an object. I’ve gotten around this using, as written for your example:
answer.ACL = ACL({user.objectId: {'read': True, 'write': True}})
Subsequently, the ACL can be set and retrieved using the method described in the docs.
Workaround seems to work. Thanks!