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):
if object is not None or info is None:
info = self._getOAI(object)
actions = []
portal = self.getPortalObject()
developer_mode_enabled = portal.portal_preferences.getPreferredHtmlStyleDevelopperMode()
if info.object is not None:
object_portal_type = info.object.getTypeInfo()
......@@ -453,6 +455,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
for wf_id in object_portal_type.getTypeWorkflowList():
wf = self._getOb(wf_id, None)
if wf is not None:
if developer_mode_enabled:
actions.append({
"id": "onlyjio_%s" % wf.getReference(),
"name": wf.getTitle(),
......@@ -465,7 +468,6 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
})
actions.extend(wf.listObjectActions(info))
portal = self.getPortalObject()
portal_url = portal.portal_url()
def _getWorklistActionList():
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