Skip to content

Commit a5a7eee

Browse files
author
Alexander Smishlajev
committed
LogoutAction: reset client context to render tracker home page...
...instead of last viewed page (may be inaccessibe for anonymous)
1 parent ec680e3 commit a5a7eee

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

roundup/cgi/actions.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: actions.py,v 1.40.2.6 2005-02-15 23:42:36 richard Exp $
1+
#$Id: actions.py,v 1.40.2.7 2005-04-07 06:20:11 a1s Exp $
22

33
import re, cgi, StringIO, urllib, Cookie, time, random, csv
44

@@ -845,12 +845,18 @@ def handle(self):
845845
# construct the logout cookie
846846
now = Cookie._getdate()
847847
self.client.additional_headers['Set-Cookie'] = \
848-
'%s=deleted; Max-Age=0; expires=%s; Path=%s;'%(self.client.cookie_name,
849-
now, self.client.cookie_path)
848+
'%s=deleted; Max-Age=0; expires=%s; Path=%s;' % (
849+
self.client.cookie_name, now, self.client.cookie_path)
850850

851851
# Let the user know what's going on
852852
self.client.ok_message.append(self._('You are logged out'))
853853

854+
# reset client context to render tracker home page
855+
# instead of last viewed page (may be inaccessibe for anonymous)
856+
self.client.classname = None
857+
self.client.nodeid = None
858+
self.client.template = None
859+
854860
class LoginAction(Action):
855861
def handle(self):
856862
"""Attempt to log a user in.

0 commit comments

Comments
 (0)