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

stat_query renamed to selection_expression


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1216 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3015f3e7
...@@ -72,7 +72,7 @@ class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper): ...@@ -72,7 +72,7 @@ class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper):
allowed[r] = 1 allowed[r] = 1
if withgroups: if withgroups:
localroles = mergedLocalRoles(ob, withgroups=1) localroles = mergedLocalRoles(ob, withgroups=1)
LOG("allowedRolesAndUsers",0,str(allowed.keys())) #LOG("allowedRolesAndUsers",0,str(allowed.keys()))
else: else:
# CMF # CMF
localroles = _mergedLocalRoles(ob) localroles = _mergedLocalRoles(ob)
...@@ -91,7 +91,7 @@ class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper): ...@@ -91,7 +91,7 @@ class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper):
allowed['user:' + user + ':' + role] = 1 allowed['user:' + user + ':' + role] = 1
if allowed.has_key('Owner'): if allowed.has_key('Owner'):
del allowed['Owner'] del allowed['Owner']
LOG("allowedRolesAndUsers",0,str(allowed.keys())) #LOG("allowedRolesAndUsers",0,str(allowed.keys()))
return list(allowed.keys()) return list(allowed.keys())
class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool): class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool):
...@@ -349,7 +349,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool): ...@@ -349,7 +349,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool):
#kw[ 'effective' ] = { 'query' : now, 'range' : 'max' } #kw[ 'effective' ] = { 'query' : now, 'range' : 'max' }
#kw[ 'expires' ] = { 'query' : now, 'range' : 'min' } #kw[ 'expires' ] = { 'query' : now, 'range' : 'min' }
LOG("search allowedRolesAndUsers",0,str(kw[ 'allowedRolesAndUsers' ])) #LOG("search allowedRolesAndUsers",0,str(kw[ 'allowedRolesAndUsers' ]))
return apply(ZCatalog.searchResults, (self, REQUEST), kw) return apply(ZCatalog.searchResults, (self, REQUEST), kw)
__call__ = searchResults __call__ = searchResults
...@@ -378,7 +378,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool): ...@@ -378,7 +378,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool):
# Forget about permissions in statistics # Forget about permissions in statistics
# (we should not count lines more than once # (we should not count lines more than once
if kw.has_key('stat_query'): del kw[ 'allowedRolesAndUsers' ] if kw.has_key('select_expression'): del kw[ 'allowedRolesAndUsers' ]
...@@ -399,7 +399,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool): ...@@ -399,7 +399,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool):
else: else:
vars = {} vars = {}
w = IndexableObjectWrapper(vars, object) w = IndexableObjectWrapper(vars, object)
LOG("IndexableObjectWrapper", 0,str(w.allowedRolesAndUsers())) #LOG("IndexableObjectWrapper", 0,str(w.allowedRolesAndUsers()))
#try: #try:
ZCatalog.catalog_object(self, w, uid, idxs=idxs, is_object_moved=is_object_moved) ZCatalog.catalog_object(self, w, uid, idxs=idxs, is_object_moved=is_object_moved)
#except: #except:
......
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