Mercurial > p > roundup > code
changeset 3264:6fc18923f837
LogoutAction: reset client context to render tracker home page...
...instead of last viewed page (may be inaccessibe for anonymous)
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Thu, 07 Apr 2005 06:20:11 +0000 |
| parents | 9a8178562411 |
| children | 9ffea8719af1 |
| files | roundup/cgi/actions.py |
| diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/actions.py Tue Apr 05 23:43:24 2005 +0000 +++ b/roundup/cgi/actions.py Thu Apr 07 06:20:11 2005 +0000 @@ -1,4 +1,4 @@ -#$Id: actions.py,v 1.46 2005-02-15 23:45:29 richard Exp $ +#$Id: actions.py,v 1.47 2005-04-07 06:19:12 a1s Exp $ import re, cgi, StringIO, urllib, Cookie, time, random, csv @@ -845,12 +845,18 @@ # construct the logout cookie now = Cookie._getdate() self.client.additional_headers['Set-Cookie'] = \ - '%s=deleted; Max-Age=0; expires=%s; Path=%s;'%(self.client.cookie_name, - now, self.client.cookie_path) + '%s=deleted; Max-Age=0; expires=%s; Path=%s;' % ( + self.client.cookie_name, now, self.client.cookie_path) # Let the user know what's going on self.client.ok_message.append(self._('You are logged out')) + # reset client context to render tracker home page + # instead of last viewed page (may be inaccessibe for anonymous) + self.client.classname = None + self.client.nodeid = None + self.client.template = None + class LoginAction(Action): def handle(self): """Attempt to log a user in.
