question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 9 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
mcastlecommented, Mar 19, 2015

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.

0reactions
flound1129commented, Mar 20, 2015

Workaround seems to work. Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found