Commit b6fe46df authored by Romain Courteaud's avatar Romain Courteaud

Unhardcode viewable_owner, owner columns and use catalog parameters instead.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25516 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0ca63bac
...@@ -605,12 +605,15 @@ def WorkflowTool_refreshWorklistCache(self): ...@@ -605,12 +605,15 @@ def WorkflowTool_refreshWorklistCache(self):
self.Base_zCreateWorklistTable() self.Base_zCreateWorklistTable()
portal_catalog = getToolByName(self, 'portal_catalog') portal_catalog = getToolByName(self, 'portal_catalog')
search_result = portal_catalog.unrestrictedSearchResults search_result = portal_catalog.unrestrictedSearchResults
acceptable_key_dict = portal_catalog.getSQLCatalog().getColumnMap() sql_catalog = portal_catalog.getSQLCatalog()
acceptable_key_dict = sql_catalog.getColumnMap()
# XXX: those hardcoded lists should be grabbed from the table dynamicaly # XXX: those hardcoded lists should be grabbed from the table dynamicaly
# (and cached). # (and cached).
table_column_id_set = ImmutableSet( table_column_id_set = ImmutableSet(
[COUNT_COLUMN_TITLE] + self.Base_getWorklistTableColumnIDList()) [COUNT_COLUMN_TITLE] + self.Base_getWorklistTableColumnIDList())
security_column_id_list = ['security_uid', 'viewable_owner', 'owner'] security_column_id_list = ['security_uid'] + \
[x[1] for x in sql_catalog.getSQLCatalogRoleKeysList()] + \
[x[1] for x in sql_catalog.getSQLCatalogLocalRoleKeysList()]
(worklist_list_grouped_by_condition, worklist_metadata) = \ (worklist_list_grouped_by_condition, worklist_metadata) = \
groupWorklistListByCondition( groupWorklistListByCondition(
worklist_dict=worklist_dict, worklist_dict=worklist_dict,
......
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