Commit 7f1cab27 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: local_roles are not acceptable by the catalog.

The local ERP5Document_getHateoas should be removed and replaced by new erp5 JIO implementation.
parent 9ae9d984
...@@ -15,7 +15,7 @@ url_template_dict = { ...@@ -15,7 +15,7 @@ url_template_dict = {
"{&relative_url,view}", "{&relative_url,view}",
"search_template": "%(root_url)s/%(script_id)s?mode=search" + \ "search_template": "%(root_url)s/%(script_id)s?mode=search" + \
"{&query,select_list*,limit*}", "{&query,select_list*,limit*}",
"new_content_action": "%(root_isurl)s/%(script_id)s?mode=newContent", "new_content_action": "%(root_url)s/%(script_id)s?mode=newContent",
# XXX View is set by default to empty # XXX View is set by default to empty
"document_hal": "%(root_url)s/%(script_id)s?mode=traverse" + \ "document_hal": "%(root_url)s/%(script_id)s?mode=traverse" + \
"&relative_url=%(relative_url)s", "&relative_url=%(relative_url)s",
...@@ -280,7 +280,6 @@ sql_catalog = portal.portal_catalog.getSQLCatalog() ...@@ -280,7 +280,6 @@ sql_catalog = portal.portal_catalog.getSQLCatalog()
# Calculate the site root to prevent unexpected browsing # Calculate the site root to prevent unexpected browsing
is_web_mode = (context.REQUEST.get('current_web_section', None) is not None) or (hasattr(context, 'isWebMode') and context.isWebMode()) is_web_mode = (context.REQUEST.get('current_web_section', None) is not None) or (hasattr(context, 'isWebMode') and context.isWebMode())
# is_web_mode = traversed_document.isWebMode() # is_web_mode = traversed_document.isWebMode()
if is_web_mode: if is_web_mode:
site_root = context.getWebSiteValue() site_root = context.getWebSiteValue()
...@@ -533,7 +532,6 @@ elif (mode == 'root') or (mode == 'traverse'): ...@@ -533,7 +532,6 @@ elif (mode == 'root') or (mode == 'traverse'):
# List of validated computers # List of validated computers
query = sql_catalog.buildQuery({ query = sql_catalog.buildQuery({
"portal_type": "Computer", "portal_type": "Computer",
"local_roles": "Assignee",
"default_strict_allocation_scope_uid": "!=%s" % traversed_document.getPortalObject().portal_categories.allocation_scope.close.forever.getUid(), "default_strict_allocation_scope_uid": "!=%s" % traversed_document.getPortalObject().portal_categories.allocation_scope.close.forever.getUid(),
"validation_state": 'validated' "validation_state": 'validated'
}).asSearchTextExpression(sql_catalog) }).asSearchTextExpression(sql_catalog)
...@@ -550,7 +548,6 @@ elif (mode == 'root') or (mode == 'traverse'): ...@@ -550,7 +548,6 @@ elif (mode == 'root') or (mode == 'traverse'):
# List of networks # List of networks
query = sql_catalog.buildQuery({ query = sql_catalog.buildQuery({
"portal_type": "Computer Network", "portal_type": "Computer Network",
"local_roles": "Assignee"
}).asSearchTextExpression(sql_catalog) }).asSearchTextExpression(sql_catalog)
http_query = make_query({ http_query = make_query({
"mode": "search", "mode": "search",
......
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