Commit 7005001e authored by Romain Courteaud's avatar Romain Courteaud

[erp5_hal_json_style] Only return worklist for viewable module's documents

parent 8745f912
...@@ -1129,15 +1129,17 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None, ...@@ -1129,15 +1129,17 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
if not same_type(portal_type, \'\'):\n if not same_type(portal_type, \'\'):\n
portal_type = portal_type[0]\n portal_type = portal_type[0]\n
\n \n
work_list.append({\n worklist_module_id = portal.getDefaultModuleId(portal_type, default=None, only_visible=True)\n
\'href\': url_template_dict["jio_search_template"] % {\n if (worklist_module_id is not None):\n
"query": make_query({"query": query})\n work_list.append({\n
},\n \'href\': url_template_dict["jio_search_template"] % {\n
\'name\': action[\'name\'],\n "query": make_query({"query": query})\n
\'count\': action[\'count\'],\n },\n
\'module\': default_document_uri_template % {\n \'name\': action[\'name\'],\n
"relative_url": portal.getDefaultModuleId(portal_type)\n \'count\': action[\'count\'],\n
}\n \'module\': default_document_uri_template % {\n
"relative_url": worklist_module_id\n
}\n
})\n })\n
\n \n
result_dict["worklist"] = work_list\n result_dict["worklist"] = work_list\n
......
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