Attention

This document was written for an unsupported version of Plone, Plone 2.5.x, and was last updated 1607 days ago.

For more information, see the version support policy.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

Unauthorized: The owner of the executing script is defined outside the context of the object being accessed. The script has proxy roles, but they do not apply in this context.

by Sven Deichmann last modified Dec 30, 2008 03:09 PM
You did everything you could to make sure your workflow script has the necessary permissions to do what it needs to do and it still does not work? Check this

You recently had a message like this (with verbose security. without it will just be something like: Unauthorized. Access to 'object' denied.):

Unauthorized: The owner of the executing script is defined outside the context of the object being accessed.  The script has proxy roles, but they do not apply in this context..  Access to 'object' of (Products.DCWorkflow.Expression.StateChangeInfo instance at 0x...) denied. Access requires one of the following roles: ['Manager', 'Owner', 'Reviewer']. The executing script is (PythonScript at /site/portal_workflow/my_workflow/scripts/myScript), owned by <PropertiedUser 'admin'>.

Of course you did everything to make sure your workflow script works and gave it Manager proxy role... you never know...

Now my advice: try it without the proxy role and just make sure the user has the "Access contents information" permission.

I do not know exactly WHY this occurs, but just removing the proxy role worked for me. Comments that explain the reason are welcome :)