[Zope-CMF] Help with a DCWorkflow guard

Dieter Maurer dieter at handshake.de
Mon Feb 16 16:08:07 EST 2004


Andrew Veitch wrote at 2004-2-12 18:28 +0000:
>This is probably really simple but I'm just not seeing it!
>
>I want a reviewer to be able to publish an object, as long as he's a
>different person from the submitter.
>
>So I need a guard expression on my publish transition that checks that user
>wasn't the submitter.

The user is available as "member".

The submitter is almost surely available as a workflow variable
(check the "Variables" tab of your workflow).
You access such variables via "portal_workflows" "getInfoFor"
method.

You guard then looks similar to:

    python: member != portal.portal_workflow.getInfoFor(object,'Actor')

-- 
Dieter



More information about the Zope-CMF mailing list