Discussion:
[Erp5-dev] proxy roles and portal_catalog
Bartłomiej Górny
2006-12-14 12:17:06 UTC
Permalink
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
Jérôme Perrin
2006-12-18 08:41:24 UTC
Permalink
Post by Bartłomiej Górny
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.
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.
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.
isn't it fixed in http://svn.erp5.org/?rev=11099&view=rev ?

J?rome

Loading...