[Zope] inserting half a dtml tag into a zclass

Dieter Maurer dieter@handshake.de
Wed, 10 Jan 2001 23:00:56 +0100 (CET)


Tim Hicks writes:
 > >  II. I think (this implies, I am not sure), that ZPublisher
 > >      translates exceptions into HTTP response codes.
 > >      This would mean, you could try:
 > >
 > >        In your "privacy" method:
 > >   ....
 > >   <dtml-call "RESPONSE.redirect(...)">
 > >   <dtml-raise type="Redirect"></dtml-raise>
 > >   ....
 > >
 > >        in your other objects:
 > >
 > >           <dtml-call privacy>
 > >   ...header...
 > >   ....
 > >   ...footer...
 > >
 > 
 > You've lost me a bit there.  Where am I actually checking to see if the user
 > has access rights?
When I use "....", this means something
you have provided or will fill in with application specific code.

Thus, in your privacy method:

  ....   <!-- do your checks -->
  <!-- you come here, when they fail -->
  <dtml-call "RESPONSE.redirect(...)">
  <dtml-raise type="Redirect"></dtml-raise>


Dieter