changeset 461:c296f00ca63e

redirect to base url after successful login imported from: moin--main--1.5--patch-465
author Thomas Waldmann <tw@waldmann-edv.de>
date Mon, 27 Feb 2006 17:44:44 +0000
parents ab5ef616b0d8
children 361f1defc4c5
files ChangeLog MoinMoin/request.py docs/CHANGES
diffstat 3 files changed, 24 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Feb 27 17:24:07 2006 +0000
+++ b/ChangeLog	Mon Feb 27 17:44:44 2006 +0000
@@ -2,6 +2,20 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-02-27 18:44:44 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-465
+
+    Summary:
+      redirect to base url after successful login
+    Revision:
+      moin--main--1.5--patch-465
+
+    redirect to base url after successful login
+    
+
+    modified files:
+     ChangeLog MoinMoin/request.py docs/CHANGES
+
+
 2006-02-27 18:24:07 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-464
 
     Summary:
--- a/MoinMoin/request.py	Mon Feb 27 17:24:07 2006 +0000
+++ b/MoinMoin/request.py	Mon Feb 27 17:44:44 2006 +0000
@@ -505,9 +505,15 @@
         password = self.form.get('password', [None])[0]
         login = self.form.has_key('login')
         logout = self.form.has_key('logout')
-        return self.get_user_default_unknown(name=name, password=password,
-                                             login=login, logout=logout,
-                                             user_obj=None)
+        u = self.get_user_default_unknown(name=name, password=password,
+                                          login=login, logout=logout,
+                                          user_obj=None)
+        if login and u.valid: # user login successful
+            # we redirect to base url to either show page_front_page or
+            # jump to the last page the user visited last time
+            self.http_redirect(self.getBaseURL())
+            self.finish()
+        return u
     
     def get_user_default_unknown(self, **kw):
         """ call do_auth and if it doesnt return a user object, make some "Unknown User" """
--- a/docs/CHANGES	Mon Feb 27 17:24:07 2006 +0000
+++ b/docs/CHANGES	Mon Feb 27 17:44:44 2006 +0000
@@ -34,6 +34,7 @@
 
 Version 1.5.current:
   New features:
+    * show frontpage or last page visited after successful login
     * attachment search using lupy (lupy_search = 1 in your config)
       Title search will also search attachment filenames.
       Full text search will also search attachment contents.