Commit 719ad684 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Type: only include ERP5JS workflow jumps when developer mode is enabled

We should not show a link to jump to workflow configuration to end users, these
are not relevant to them and can only cause confusion.
parent fbe309c7
Pipeline #15370 passed with stage
in 0 seconds
...@@ -446,6 +446,8 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool): ...@@ -446,6 +446,8 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
if object is not None or info is None: if object is not None or info is None:
info = self._getOAI(object) info = self._getOAI(object)
actions = [] actions = []
portal = self.getPortalObject()
developer_mode_enabled = portal.portal_preferences.getPreferredHtmlStyleDevelopperMode()
if info.object is not None: if info.object is not None:
object_portal_type = info.object.getTypeInfo() object_portal_type = info.object.getTypeInfo()
...@@ -453,6 +455,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool): ...@@ -453,6 +455,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
for wf_id in object_portal_type.getTypeWorkflowList(): for wf_id in object_portal_type.getTypeWorkflowList():
wf = self._getOb(wf_id, None) wf = self._getOb(wf_id, None)
if wf is not None: if wf is not None:
if developer_mode_enabled:
actions.append({ actions.append({
"id": "onlyjio_%s" % wf.getReference(), "id": "onlyjio_%s" % wf.getReference(),
"name": wf.getTitle(), "name": wf.getTitle(),
...@@ -465,7 +468,6 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool): ...@@ -465,7 +468,6 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
}) })
actions.extend(wf.listObjectActions(info)) actions.extend(wf.listObjectActions(info))
portal = self.getPortalObject()
portal_url = portal.portal_url() portal_url = portal.portal_url()
def _getWorklistActionList(): def _getWorklistActionList():
worklist_dict = {} worklist_dict = {}
......
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