[Zope3-dev] setUpEditWidgets fails

Gary Poster gary at zope.com
Tue Mar 8 11:21:25 EST 2005


On Mar 8, 2005, at 11:08 AM, Roger Ineichen wrote:

> Hi Gary

Hi. :-)

<snip>

> In the "EditView" there is a location proxy used if the self.context
> isn't the adapted object. Which is true for trusted adapters.
>
> ---------
> if adapted is not self.context:
>     if not ILocation.providedBy(adapted):
>         adapted = LocationProxy(adapted)
>     adapted.__parent__ = self.context
> ---------
>
> This ends in a proxied object.
>
> The adapted Adapter is registred with trusted="True".
> This sould force a trusted not proxied adapted object.
>
> Hm, this sounds like the LocationProxy is proxying my
> trusted adapter.

Yes indeed.

> Another Hm, Why is the trusted adapter still working
> if I comment out the LocationProxy part?

I believe it is necessary in order to calculate permissions in the 
default security policy (it walks parents to aggregate grants and 
denies, I think).

> Do I not need a LocationProxy on trusted adapted objects?

You probably want it.

> The other part in the setupEditWidget works correct.

OK, cool.

Let me look at this for a bit.  I'll try to duplicate your problem in a 
doctest and see if I can figure out a solution.

Gary



More information about the Zope3-dev mailing list