collective / collective.celery

celery integration with Plone
Other
9 stars 9 forks source link

Unauthorized: Your user account is defined outside the context of the object being accessed #8

Open MrTango opened 8 years ago

MrTango commented 8 years ago

I get the following error, if i try to get a in the same task created Folder:

Unauthorized: Your user account is defined outside the context of the object being accessed.  Access to 'tumorarten' of (PloneSite at /Plone) denied. Your user account, Maik, exists at /Plone/acl_users. Access requires Access_contents_information_Permission, granted to the following roles: ['Contributor', 'Editor', 'Manager', 'Member', 'Owner', 'Reader', 'Site Administrator'].

The user: Maik Has the following roles in the task: ['Reader Statistics', 'Authenticated', 'Site Administrator', 'Member', 'Manager', 'Reviewer']

and therefor he has the needed permission: 'Access contents information': True

calvinhp commented 8 years ago

I ran into this problem as well. It appears to be an issue with acquisition. If you setup a newSecurityManager() using a freshly wrapped user object in the context of your portal, your permissions will appear correctly. This also appears to be an issue if you call a "Script (Python)" in the context of your object. It can't find it due to improper acquisition wrapping.

MrTango commented 8 years ago

thx for the tip, for this project i switched to collective.taskqueue and I'm happy with it, it's even easier to test.