Skip to content

Commit

Permalink
backport 912636 (Futon admin creation race condition to 0.11.x)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/0.11.x@912637 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jchris committed Feb 22, 2010
1 parent 08f583a commit 6789241
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions THANKS
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ suggesting improvements or submitting changes. Some of these people are:
* 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.
12 changes: 9 additions & 3 deletions share/www/script/futon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6789241

Please sign in to comment.