changeset 4158:74e295d4a75e

Fixed: errors in calling of handle_auth(_form)
author Florian Krupicka <florian.krupicka@googlemail.com>
date Wed, 11 Jun 2008 11:29:03 +0200
parents 264e5687ef1c
children b84bcea48523
files MoinMoin/web/utils.py MoinMoin/wsgiapp.py
diffstat 2 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/web/utils.py	Tue Jun 10 21:28:39 2008 +0200
+++ b/MoinMoin/web/utils.py	Wed Jun 11 11:29:03 2008 +0200
@@ -30,14 +30,16 @@
     return user_obj
 
 def handle_auth_form(user_obj, form):
-    username = form.get('name')
-    password = form.get('password')
-    openid_identifier = form.get('openid_identifier')
-    login = 'login' in form
-    logout = 'logout' in form
-    stage = form.get('stage')
-    attended = True
-    return handle_auth(user_obj, **locals())
+    params = {
+        'username': form.get('name'),
+        'password': form.get('password'),
+        'openid_identifier': form.get('openid_identifier'),
+        'login': 'login' in form,
+        'logout': 'logout' in form,
+        'stage': form.get('stage'),
+        'attended': True
+    }
+    return handle_auth(user_obj, **params)
 
 def redirect_last_visited(request):
     pagetrail = request.user.getTrail()
--- a/MoinMoin/wsgiapp.py	Tue Jun 10 21:28:39 2008 +0200
+++ b/MoinMoin/wsgiapp.py	Wed Jun 11 11:29:03 2008 +0200
@@ -48,7 +48,7 @@
     user_obj = request.cfg.session_handler.start(request, request.cfg.session_id_handler)
     
     request.user = None
-    request.user = handle_auth_form(user_obj)
+    request.user = handle_auth_form(user_obj, request.form)
 
     request.cfg.session_handler.after_auth(request, request.cfg.session_id_handler, request.user)