[Zope] Zope Logout

Todd Graham tgraham@speakeasy.net
Wed, 30 Jan 2002 18:27:03 -0800


Take a look on Zope.org for Cookie User Folder, or ExUserFolder these
products give you more flexibility when handling authentication.

Hope this helps,

T

----- Original Message -----
From: Keith Alperin <KAlperin@ignitesports.com>
To: <zope@zope.org>
Sent: Wednesday, January 30, 2002 12:33 PM
Subject: [Zope] Zope Logout


Greetings Zopistas!

I'm currently working on a site where I have one requirement left to
fulfill before I can release.  I need to be able to allow users to
logout and sign in as someone else.  After doing some research I came up
with some DTML that looks like this (I don't have the code in front of
me, but it's pretty similar):

<dtml-raise Unauthorized>
You are not authorized
</dtml-raise>

This does log the person out, but also generates a pretty ugly error
message.  If possible, I'd like to use a redirect.  However, this still
raised the Unauthorized error:

<dtml-raise Unauthorized>
<dtml-var expr="RESPONSE.redirect('/')">
</dtml-raise>

Finally, I tried a try/finally block which still errored out:

<dtml-try>
<dtml-raise Unauthorized>
You are not authorized
</dtml-raise>
<dtml-finally>
<dtml-var expr="RESPONSE.redirect('/')">
</dtml-try>

Any advice that anyone can provide would be MOST appreciated.

Thanks so much!

Keith R. Alperin



_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )