[ZPT] proxy role for PT

Florent Guillaume fg@nuxeo.com
Tue, 6 Aug 2002 12:21:48 +0000 (UTC)


Chris Withers  <chrisw@nipltd.com> wrote:
> Magnus Heino wrote:
> >>>How can I set the proxy roles on the ZPT, if I want  when it executes
> >>>it has the "Manager" role (in DTML Method I use Proxy management tab)?
> >>
> >>It would appear that ZPT has no proxy role management. This is a little
> >>surprising, perhaps someoen can enlighten us as to why?
> > 
> > 
> > http://lists.zope.org/pipermail/zpt/2001-December/002533.html
> 
> Yeah, but what about when your 'logic' is protected by permissions and 
> you want to use it in your presentation?

In that case I write a python product :)

> Say I have 10 python scripts that I want to use in a Page Template. They 
> all require roles the user won't have and 5 of them are used in contexts 
> where I only want them to work if the user has the appropriate role 
> themselves.

Python product I say!

> At the very least, I have to go and set the same proxy role on 10 
> methods, which is a nice opportunity to introduce a typo bug, and at 
> most, it prevents me from using the other 5 scripts the way I had 
> intended :-(

You're saying you'd rather have the presentation component merrily
become Manager (and maybe do unintended things), rather than have fine
grained permission delegation in the scripts?

Florent
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com