Proxy Roles does't work for a Script using portal_catalog.searchResults
Bug #161629 reported by
james wang
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope CMF buildout |
Fix Released
|
Medium
|
Tres Seaver |
Bug Description
if some contents is not allowed to be searched by portal search utility, but need to be searched out using Script(Python) with proxy_roles( one of the use cases is card verfification),the Products.
so if we can added the Proxy roles in the kw['allowedRole
To post a comment you must log in.
Index: CatalogTool.py ======= ======= ======= ======= ======= ======= ======= ======= ====
=======
--- CatalogTool.py (Revision 38302)
+++ CatalogTool.py (working copy)
@@ -15,7 +15,7 @@
$Id$
"""
-from AccessControl import ClassSecurityInfo fo,getSecurityM anager PermissionRole import rolesForPermiss ionOn
query = (lo, hi)
range = 'min:max'
kw[k] = {'query': query, 'range': range} ger()._ context. stack[- 1] eo,'_proxy_ roles', None) sAndUsers' ].append( r)
+from AccessControl import ClassSecurityIn
from AccessControl.
from DateTime import DateTime
from Globals import DTMLFile
@@ -275,7 +275,14 @@
+ else:
+ eo = getSecurityMana
+ proxy_roles = getattr(
+ if proxy_roles:
+ for r in proxy_roles:
+ kw['allowedRole
+ searchResults( self, REQUEST, **kw)
return ZCatalog.
__call__ = searchResults