[ZPT] Permissions, ZPT and absolute_url
Dieter Maurer
dieter@handshake.de
Wed, 4 Dec 2002 21:46:22 +0100
Jay, Dylan writes:
> ....
> > I would go for a Python Script with an appropriate proxy role
> > that computed the requested "absolute_url". It would be nicer,
>
> So if I link to 10 other pages and need their url, I need 10 python scripts?
No.
You have a single Python Script "getAbsoluteURL".
It takes a path, resolves the path to an object using
"restrictedTraverse" and returns its "absolute_url".
Its Proxy role ensures, "restrictedTraverse" will not
fail.
> ..
> > when ZPT had proxy roles, but ....
>
> Is there a good reason why it has no proxy roles?
Someone explained that ZPT should only be used for presentation
and proxy roles were more associated with logic rather than
presentation.
Personally, this argument did not convince me. But the issue
it not urgent enough for me that I would try to implement
proxy roles for ZPTs.
Dieter