[ZPT] No proxy roles in page templates? What do I do then?
Dieter Maurer
dieter@handshake.de
Wed, 26 Sep 2001 22:05:21 +0200 (CEST)
Itai Tavor writes:
> >>I just discovered that page templates don't have proxy roles. From
> >>the fact that nobody is complaining, I assume there must be some
> >>new, ZPT way of doing things that doesn't require proxy roles... I
> >>hope there is. Anyone wants to tell me what it is? Seems to me that
> >>this severely limits how secure I can make products...
> >
> >
> >Use a Script. Templates and Scripts cooperate quite well.
Starting with Zope 2.2, the effective Proxy roles are no longer
defined by the published object (alone).
The Proxy roles of an object are effective for all accesses
that this object makes. Proxy roles are no longer passed to
invoked objects.
Thus, you can make a script, give it the necessary Proxy roles,
and let it do the necessary accesses.
Dieter