[Zope] proxy role for an external method
Jens Vagelpohl
jens at dataflake.org
Mon Oct 10 19:43:35 EDT 2005
On 10 Oct 2005, at 23:14, Peter Bengtsson wrote:
>> I understood that Plone does some extra magic, so I have to setup a
>> securoty context... I'll post it here if I have a working solution
>>
>>
> Shouldn't really be the problem. Isn't portal_catalog just another
> ZCatalog that has nothing to do with Plone except it's located inside
> a Plone instance.
It *is* a problem. The reason is most likiely all the extra stuff the
catalog tool adds to the query before it reaches the actual catalog.
The workaround is something like this:
from Products.ZCatalog.ZCatalog import ZCatalog
results = ZCatalog.searchResults(portal_catalog, **kws)
That way you circumvent any query munging done in the catalog tool
searchResults method, specifically the effective/expires and
allowedRolesAndUsers filtering.
jens
More information about the Zope
mailing list