Commit 0fb26533 authored by Jean-Paul Smets's avatar Jean-Paul Smets

New portal type group (index pages for crawling API) as well as some comments in the code.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15686 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b98bbbbf
...@@ -179,6 +179,7 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -179,6 +179,7 @@ class ERP5TypeInformation( FactoryTypeInformation,
# DMS # DMS
'document', 'web_document', 'file_document', 'document', 'web_document', 'file_document',
'recent_document', 'my_document', 'template_document', 'recent_document', 'my_document', 'template_document',
'crawler_index',
# MRP # MRP
'divergence_tester', 'calendar_period' 'divergence_tester', 'calendar_period'
# Project # Project
...@@ -275,6 +276,7 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -275,6 +276,7 @@ class ERP5TypeInformation( FactoryTypeInformation,
""" """
Return list of content types. Return list of content types.
XXX I (seb) think the name is bad XXX I (seb) think the name is bad
(jp) yes, the name is bad, it should be getAvailablePropertySheetList
""" """
result = Products.ERP5Type.PropertySheet.__dict__.keys() result = Products.ERP5Type.PropertySheet.__dict__.keys()
result = filter(lambda k: not k.startswith('__'), result) result = filter(lambda k: not k.startswith('__'), result)
...@@ -523,6 +525,7 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -523,6 +525,7 @@ class ERP5TypeInformation( FactoryTypeInformation,
if isinstance(category_result, dict): if isinstance(category_result, dict):
# category_result is a dict (which provide group IDs directly) # category_result is a dict (which provide group IDs directly)
# which represents of mapping of roles, security group IDs # which represents of mapping of roles, security group IDs
# XXX explain that this is for providing user IDs mostly
role_category_list_dict.setdefault(role, category_result) role_category_list_dict.setdefault(role, category_result)
else: else:
# category_result is a list of dicts that represents the resolved # category_result is a list of dicts that represents the resolved
...@@ -552,7 +555,10 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -552,7 +555,10 @@ class ERP5TypeInformation( FactoryTypeInformation,
continue continue
role_group_dict = {} role_group_dict = {}
for category_dict in value_list: for category_dict in value_list:
group_id = group_id_generator(**category_dict) group_id = group_id_generator(**category_dict) # category_order is passed in the dict
# apparently, python can handle it
# even though category_order is not a named variable
# of the script
# If group_id is not defined, do not use it # If group_id is not defined, do not use it
if group_id not in (None, ''): if group_id not in (None, ''):
if isinstance(group_id, str): if isinstance(group_id, str):
......
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