Skip to content

Commit

Permalink
Forgot var i=0
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal authored and isaacs committed Sep 1, 2011
1 parent 2a03fd3 commit fe36c01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion registry/app.js
Expand Up @@ -1184,7 +1184,7 @@ ddoc.validate_doc_update = function (newDoc, oldDoc, user, dbCtx) {
}
function isAdmin () {
if (dbCtx.admins.names.indexOf(user.name) !== -1) return true
for (var i;i<user.roles.length;i++) {
for (var i=0;i<user.roles.length;i++) {
if (dbCtx.admins.roles.indexOf(user.roles[i]) !== -1) return true
}
return user.roles.indexOf("_admin") >= 0
Expand Down

0 comments on commit fe36c01

Please sign in to comment.