[Zope] Re: How do I logout using DTML

2005-05-14 Thread Josef Meile
Dear Allen,
please post your replies to the newsgroup as well.
I tried both yours and the dtml-raise methods, but both of them didn't 
work.
With yours I redirect myself out but I still logged in.
With dtml-raise Unathorized, it popped out an password query box and 
kept ask me to input password for three time and went to an error page 
and I'm still logged in as well.

Did I do anything wrong??

The dtml-raise should work. I don't know why isn't workning for you.
Perhaps you stored the password in the browser or something like that,
try deleting the stored passwords. About the popup window and the error
message, as Jens post in the other message you started, this is the
normal behaviour and can't be avoided. One way I can think about solving
this behaviour is storing a hidden input field like go_to_logout, then
check the request in the standard_error_message when an unauthorized
exception occures and close the window with javascript if such variable
is found. I know that zope can access the variables on the request after
an error happens, but I'm not I'm not sure if this is going to work with
an UnauthorisedException.
For the second approach with the authorization cookies, you first have
to make sure that you have installed CookieCrumbler and that you have
created an instance of it. After doing this, the expiration cookies
method should work. Once you install CookieCrumbler, you can modify the
default login forms if you want.
Regards,
Josef
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: How do I logout using DTML

2005-05-12 Thread Josef Meile
How do I logout current user using DTML
I used dtml-call expr=acl_users.logout(REQUEST) but it didn't work 
and zope gave me this.
 

Site Error
An error was encountered while publishing this resource.
*Error Type: AttributeError*
*Error Value: logout*
**
 
*What did I do wrong??*
You didn't specify which user folder you are using and if, for example,
you use it with CookieCrumbler or other pluggins. If you use
CookieCrumbler, then you can expire the authentication cookies like
this:
dtml-call REQUEST['RESPONSE'].expireCookie('__ac', path='/')
dtml-call REQUEST['RESPONSE'].expireCookie('__ac', path='/')
I think a redirect is also needed, but I'm not sure.
If you aren't using CookieCrumbler, then you can try the method
described here:
http://zdp.zope.org/projects/zfaq/faq/General#973291635
Regards,
Josef
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )