Commit 064b817f authored by Łukasz Nowak's avatar Łukasz Nowak

Fixup 8b4a67a6

Allow recurse calls with uid, just disallow in public method.
parent 90970767
......@@ -883,9 +883,6 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
'activate_kw' may specify an active process to collect results.
"""
if 'uid' in kw:
raise TypeError("'uid' cannot be used to select documents as it is "
"used internally")
catalog_kw = dict(kw)
packet_size = catalog_kw.pop('packet_size', 30)
limit = packet_size * catalog_kw.pop('activity_count', 100)
......@@ -913,6 +910,9 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
security.declarePublic('searchAndActivate')
def searchAndActivate(self, *args, **kw):
"""Restricted version of _searchAndActivate"""
if 'uid' in kw:
raise TypeError("'uid' cannot be used to select documents as it is "
"used internally")
return self._searchAndActivate(restricted=True, *args, **kw)
InitializeClass(CatalogTool)
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