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