couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r912636 - in /couchdb/trunk: THANKS share/www/script/futon.js
Date Mon, 22 Feb 2010 15:52:46 GMT
Author: jchris
Date: Mon Feb 22 15:52:46 2010
New Revision: 912636

URL: http://svn.apache.org/viewvc?rev=912636&view=rev
Log:
fixed race condition in admin creation - thanks Matt Goodall

Modified:
    couchdb/trunk/THANKS
    couchdb/trunk/share/www/script/futon.js

Modified: couchdb/trunk/THANKS
URL: http://svn.apache.org/viewvc/couchdb/trunk/THANKS?rev=912636&r1=912635&r2=912636&view=diff
==============================================================================
--- couchdb/trunk/THANKS (original)
+++ couchdb/trunk/THANKS Mon Feb 22 15:52:46 2010
@@ -46,5 +46,6 @@
  * Damjan Georgievski <gdamjan@mail.net.mk>
  * Jan Kassens <jan@kassens.net>
  * James Marca <jmarca@translab.its.uci.edu>
+ * Matt Goodall <matt.goodall@gmail.com>
 
 For a list of authors see the `AUTHORS` file.

Modified: couchdb/trunk/share/www/script/futon.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/futon.js?rev=912636&r1=912635&r2=912636&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/futon.js (original)
+++ couchdb/trunk/share/www/script/futon.js Mon Feb 22 15:52:46 2010
@@ -69,9 +69,15 @@
           if (!validateUsernameAndPassword(data, callback)) return;
           $.couch.config({
             success : function() {
-              callback();
-              doLogin(data.name, data.password, callback);            
-              doSignup(data.name, null, callback, false);
+              doLogin(data.name, data.password, function(errors) {
+                if(!$.isEmptyObject(errors)) {
+                  callback(errors);
+                  return;
+                }
+                doSignup(data.name, null, function(errors) {
+                  callback(errors);
+                  }, false);
+                });            
             }
           }, "admins", data.name, data.password);
         }



Mime
View raw message