[Zope] Pre & post processing

Chris McDonough chrism@zope.com
Sat, 8 Feb 2003 15:22:15 -0500


Probably the best thing to do is to create an "Access Rule".  An
access rule is "fired" when someone traverses over a container which
contains one.

A common gotcha with this is that the security context will not have
been set up when the access rule is fired (the user will appear to be
the "anonymous user").  Most other things should work ok.

See
http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ZopeServic
es.stx , the section titled "Access Rule Services".

- C

----- Original Message -----
From: "Andrew Athan" <zope-response@memeplex.com>
To: <zope@zope.org>
Sent: Saturday, February 08, 2003 3:15 PM
Subject: [Zope] Pre & post processing


> I'm wondering what the "best" way to pre and/or post process all
> requests to either the entire Zope server or (better) a particular
> sub-tree of the content.
>
> I want to be able to verify that the request contains particular
> headers, that the session object is set-up with certain defaults,
etc.
> etc.  I'd like to be able to redirect the request if it doesn't meet
> certain requirements (at minimum, by raising an exception which ends
up
> rendering standard_error_message).
>
> Suggestions?
> RTFM responses welcomed (as long as they specify what to read).
>
> Thanks,
> A.
>
>