[Zope] Some __bobo_traverse__ help

Dieter Maurer dieter at handshake.de
Tue Mar 27 15:31:13 EDT 2007


Garito wrote at 2007-3-27 02:50 +0200:
>How could be the __bobo_traverse__ to work as expected with out losting
>traverse_subpath?

You need to do strange things in "__bobo_traverse__" to loose the
"traverse_subpath": in fact, you need to tamper with the
"TraversalRequestNameStack", or to no longer traverse to the objects
that set the "traverse_subpath" (in their "__before_publishing_traverse__"
hook).


I fear you need to go back to the drawing board.

When I remember right, then your primary problem has been that
Zope's security machinery fails when "__bobo_traverse__" returns objects
which are neither acquisition wrapped nor have their own security declarations
(such as strings, unicode, etc).

Therefore, I suggested that you instead of the elementary types return
wrappers for those types which behave identical to them but in
addition have the security declaration "__roles__ = None" (which means
the object is public).

That seemed to work quite well for some time.


Now you are facing obscure problems (a user is not authenticated although
you think it should be). Unless you are URL traversing to one of the
wrappers above (which you should not do of course), this problem
should have nothing to do with the wrappers.
Almost surely, it is a different problem -- which one, I cannot tell you.
But, I gave some hints as to how I would proceed to understand the problem.



-- 
Dieter


More information about the Zope mailing list