Commit 36c6e1aa authored by Jean-Paul Smets's avatar Jean-Paul Smets

Include the portal_url in worklists. This is useful to prevent unwanted acquisition.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15216 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c36f0ff
...@@ -115,6 +115,8 @@ def DCWorkflowDefinition_listGlobalActions(self, info): ...@@ -115,6 +115,8 @@ def DCWorkflowDefinition_listGlobalActions(self, info):
return None # Optimization return None # Optimization
workflow_tool = getToolByName(self, 'portal_workflow') workflow_tool = getToolByName(self, 'portal_workflow')
workflow = getattr(workflow_tool, self.id) workflow = getattr(workflow_tool, self.id)
portal_url = getToolByName(self, 'portal_url')
portal_url = portal_url()
_getPortalTypeListForWorkflow = CachingMethod(workflow.getPortalTypeListForWorkflow, _getPortalTypeListForWorkflow = CachingMethod(workflow.getPortalTypeListForWorkflow,
id=('_getPortalTypeListForWorkflow', self.id), id=('_getPortalTypeListForWorkflow', self.id),
cache_factory = 'erp5_ui_long') cache_factory = 'erp5_ui_long')
...@@ -181,7 +183,7 @@ def DCWorkflowDefinition_listGlobalActions(self, info): ...@@ -181,7 +183,7 @@ def DCWorkflowDefinition_listGlobalActions(self, info):
else: else:
fmt_data._push({'local_roles': ''}) fmt_data._push({'local_roles': ''})
res.append((id, {'name': qdef.actbox_name % fmt_data, res.append((id, {'name': qdef.actbox_name % fmt_data,
'url': qdef.actbox_url % fmt_data, 'url': '%s/%s' % (portal_url, qdef.actbox_url % fmt_data),
'worklist_id': id, 'worklist_id': id,
'workflow_title': self.title, 'workflow_title': self.title,
'workflow_id': self.id, 'workflow_id': self.id,
......
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