dabo Commit
Revision 5461
Date: 2009-10-14 17:04:08 -0700 (Wed, 14 Oct 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5461

Changed:
U   trunk/dabo/dSecurityManager.py

Log:
Accepted dSecurityManager patch by Jacek to allow a dict of return values from
the login form. 

Ticket #1290


Diff:
Modified: trunk/dabo/dSecurityManager.py
===================================================================
--- trunk/dabo/dSecurityManager.py      2009-10-14 21:01:03 UTC (rev 5460)
+++ trunk/dabo/dSecurityManager.py      2009-10-15 00:04:08 UTC (rev 5461)
@@ -20,7 +20,17 @@
                        if attempt > 0:
                                message = _("Login incorrect, please try again. 
(%s/%s)") % (
                                                attempt+1, 
self.LoginAttemptsAllowed)
-                       user, password = self.Application.getLoginInfo(message)
+                       loginInfo = self.Application.getLoginInfo(message)
+                       
+                       if isinstance(loginInfo[1], dict):
+                               # loginInfo variable is a tuple (userName 
(str), loginInfo (dict)).
+                               # Dictionary keys are: user, password, 
connection.
+                               user = loginInfo[1]["user"]
+                               password = loginInfo[1]
+                       else:
+                               # loginInfo variable is a tuple of user name 
and password.
+                               user = loginInfo[0]
+                               password = loginInfo[1]
 
                        if user is None:
                                # login form canceled.




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to