I am trying to build a custom folder listing with quick links to the document actions for the object in the folder.
To load the actions defined for a given object obj
I do in a browser view for the folder:
portal_actions = getToolByName(self.context, 'portal_actions')
actions = portal_actions.listActionInfos(object=obj, categories=('object_buttons',))
But for some reason actions
always contains only the Copy action. Delete object, Rename etc are missing. When using the Plone UI with the same user (Manager) I can access all actions for the object I.
Experimentation with new dummy actions has shown that the source of the problem must be the permission and condition checking listActionInfos
performs. But here I'm stuck... Comparing the evaluation contexts used to check the permissions and condition expressions for the actions revealed no significant differences between the invocations from the browser view and the normal Plone UI for the object.
What could be the problem?