changeset 556:93b1464dff45

fixed sslclientcert auth imported from: moin--main--1.5--patch-560
author Thomas Waldmann <tw@waldmann-edv.de>
date Thu, 13 Apr 2006 15:55:52 +0000
parents ca312363c3c3
children 05319d64f0b5
files ChangeLog MoinMoin/auth.py
diffstat 2 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Apr 13 07:19:08 2006 +0000
+++ b/ChangeLog	Thu Apr 13 15:55:52 2006 +0000
@@ -2,6 +2,20 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-04-13 16:55:52 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-560
+
+    Summary:
+      fixed sslclientcert auth
+    Revision:
+      moin--main--1.5--patch-560
+
+    fixed sslclientcert auth
+    
+
+    modified files:
+     ChangeLog MoinMoin/auth.py
+
+
 2006-04-13 08:19:08 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-559
 
     Summary:
--- a/MoinMoin/auth.py	Thu Apr 13 07:19:08 2006 +0000
+++ b/MoinMoin/auth.py	Thu Apr 13 15:55:52 2006 +0000
@@ -227,7 +227,7 @@
             commonname = env.get('SSL_CLIENT_S_DN_CN', '')
             commonname_lower = commonname.lower()
             if email_lower or commonname_lower:
-                for uid in user.getUserList():
+                for uid in user.getUserList(request):
                     u = user.User(request, uid,
                                   auth_method='sslclientcert', auth_attribs=())
                     if email_lower and u.email.lower() == email_lower:
@@ -250,6 +250,9 @@
                         break
                 else:
                     u = None
+                if u is None:
+                    # user wasn't found, so let's create a new user object
+                    u = user.User(request, name=commonname_lower, auth_username=commonname_lower)
 
     if u:
         u.create_or_update(changed)