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.
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.
Chris McDonough wrote:
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.
----- Original Message ----- From: "Andrew Athan" <zope-response@memeplex.com>
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.
See the (newly created) issue at http://collector.zope.org/Zope/802 Cheers, Evan @ 4-am
participants (3)
-
Andrew Athan -
Chris McDonough -
Evan Simpson