[Erp5-dev] proxy roles and portal_catalog

Bartłomiej Górny bartek at erp5.pl
Thu Dec 14 13:17:06 CET 2006


Hello

I noticed a problem - proxy roles given to a script do not seem to affect 
results returned by portal_catalog searches performed by the script.

Specifically, the behaviour is the following:

This script:

p=context.restrictedTraverse('person_module/40')
print p.getRelativeUrl(),p.getTitle()
return printed

run by Anonymous user without proxy roles redirects to login screen, an with 
proxy roles returns expected results.

While this:

res=context.getPortalObject().portal_catalog(portal_type="Person", 
reference='an_existing_user_reference')

returns no result no matter what proxy roles are set on the script (needess to 
say that run by an authorized user returns what it should).

Is this a known bug? In my project this is a very serious problem.

Bartek



More information about the Erp5-dev mailing list