Commit c1c93d0c authored by 's avatar

- some GS handler tweaking

parent c439fd6b
...@@ -232,7 +232,7 @@ class WorkflowDefinitionConfigurator( Implicit ): ...@@ -232,7 +232,7 @@ class WorkflowDefinitionConfigurator( Implicit ):
'script_info' -- a list of mappings describing the scripts which 'script_info' -- a list of mappings describing the scripts which
provide added business logic (see '_extractScripts'). provide added business logic (see '_extractScripts').
""" """
workflow_info[ 'manager_bypass' ] = workflow.manager_bypass workflow_info[ 'manager_bypass' ] = bool(workflow.manager_bypass)
workflow_info[ 'creation_guard' ] = self._extractCreationGuard(workflow) workflow_info[ 'creation_guard' ] = self._extractCreationGuard(workflow)
workflow_info[ 'state_variable' ] = workflow.state_var workflow_info[ 'state_variable' ] = workflow.state_var
workflow_info[ 'initial_state' ] = workflow.initial_state workflow_info[ 'initial_state' ] = workflow.initial_state
...@@ -1011,7 +1011,7 @@ def _initDCWorkflow( workflow ...@@ -1011,7 +1011,7 @@ def _initDCWorkflow( workflow
""" """
workflow.title = title workflow.title = title
workflow.description = description workflow.description = description
workflow.manager_bypass = manager_bypass workflow.manager_bypass = manager_bypass and 1 or 0
workflow.state_var = state_variable workflow.state_var = state_variable
workflow.initial_state = initial_state workflow.initial_state = initial_state
......
...@@ -1331,7 +1331,7 @@ _EMPTY_WORKFLOW_EXPORT = """\ ...@@ -1331,7 +1331,7 @@ _EMPTY_WORKFLOW_EXPORT = """\
description="%s" description="%s"
state_variable="state" state_variable="state"
initial_state="%s" initial_state="%s"
manager_bypass="0"> manager_bypass="False">
</dc-workflow> </dc-workflow>
""" """
...@@ -1344,7 +1344,7 @@ _OLD_WORKFLOW_EXPORT = """\ ...@@ -1344,7 +1344,7 @@ _OLD_WORKFLOW_EXPORT = """\
title="%(title)s" title="%(title)s"
state_variable="state" state_variable="state"
initial_state="%(initial_state)s" initial_state="%(initial_state)s"
manager_bypass="0"> manager_bypass="False">
<permission>Open content for modifications</permission> <permission>Open content for modifications</permission>
<permission>Modify content</permission> <permission>Modify content</permission>
<permission>Query history</permission> <permission>Query history</permission>
...@@ -1589,7 +1589,7 @@ _NORMAL_WORKFLOW_EXPORT = """\ ...@@ -1589,7 +1589,7 @@ _NORMAL_WORKFLOW_EXPORT = """\
description="%(description)s" description="%(description)s"
state_variable="state" state_variable="state"
initial_state="%(initial_state)s" initial_state="%(initial_state)s"
manager_bypass="0"> manager_bypass="False">
<permission>Open content for modifications</permission> <permission>Open content for modifications</permission>
<permission>Modify content</permission> <permission>Modify content</permission>
<permission>Query history</permission> <permission>Query history</permission>
...@@ -1839,7 +1839,7 @@ _CREATION_GUARD_WORKFLOW_EXPORT = """\ ...@@ -1839,7 +1839,7 @@ _CREATION_GUARD_WORKFLOW_EXPORT = """\
description="%s" description="%s"
state_variable="state" state_variable="state"
initial_state="%s" initial_state="%s"
manager_bypass="1"> manager_bypass="True">
<instance-creation-conditions> <instance-creation-conditions>
<guard> <guard>
<guard-permission>Add portal content</guard-permission> <guard-permission>Add portal content</guard-permission>
......
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
description info/description; description info/description;
manager_bypass info/manager_bypass; manager_bypass info/manager_bypass;
state_variable info/state_variable; state_variable info/state_variable;
initial_state info/initial_state"> initial_state info/initial_state"
<instance-creation-conditions tal:define="creation_guard info/creation_guard" tal:condition="creation_guard"> ><tal:case tal:condition="info/creation_guard">
<instance-creation-conditions tal:define="creation_guard info/creation_guard">
<guard <guard
><tal:case tal:condition="creation_guard/guard_permissions"> ><tal:case tal:condition="creation_guard/guard_permissions">
<guard-permission <guard-permission
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
tal:content="creation_guard/guard_expr">EXPRESSION</guard-expression tal:content="creation_guard/guard_expr">EXPRESSION</guard-expression
></tal:case> ></tal:case>
</guard> </guard>
</instance-creation-conditions> </instance-creation-conditions></tal:case>
<permission <permission
tal:repeat="permission info/permissions" tal:repeat="permission info/permissions"
tal:content="permission">PERMISSION</permission> tal:content="permission">PERMISSION</permission>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment