Ignore CSRF protection for doActionFor workflow in Script Python on Plone 5

I am trying to complete a workflow transition using Script Python.

Like this:

wtool = context.portal_workflow
obj = context.Plone.doc1
wtool.doActionFor(obj, 'publish')
obj.reindexObject()

But I have a confirmation page. This is the name of the page Confirming User Action.

I think this is an automatic CSRF protection feature. Please let me know. Ignoring protection for my script.

+4
source share
1 answer

I assume your script is being called from a link. You need to change the way the script is called:

+6

All Articles