[Zope-CMF] change skin based on use property

Paul Winkler pw_lists@slinkp.com
Mon, 30 Sep 2002 13:14:17 -0700


On Mon, Sep 30, 2002 at 11:33:12AM -0700, sean.upton@uniontrib.com wrote:
> Yuck; it would really be nice if there was a way to do this within an access
> rule, even if some sort of sessioning/cookie/whatever machinery had to be
> used?

Hmm. not sure. the REQUEST object, where you normally find cookie data,
isn't fully constructed until after traversal - so I'm not sure if the
cookies are available when the access rule is called. It would be
worth finding out.

If you *can* get at cookie data, that might be a good solution.

> Hopefully there is something more graceful (I really don't want to have to
> have to put the heavy lifting inside the skin methods?)...

I agree, it's kinda ugly.
There was discussion here of a hook that could be used when
authentication happens, so you'd be able to programmatically do something
after the usual AccessRules but before the page view is rendered, and
find out who the user is, etc. at that time.

... but I don't think it's been implemented. Or maybe I missed it.

> Quick, unrelated question for the list: does anyone know if an external
> method is going to have a measurably significant performance advantage over
> using a TTW Python script for an access rule?

Inquiring minds want to know...
--

Paul Winkler
"Welcome to Muppet Labs, where the future is made - today!"