handling case where user does not satisfy any of the privilege thresholds given to the hasEnoughReputationFor method

This commit is contained in:
Julian Lam
2014-11-04 23:19:19 -05:00
parent 06f66337fb
commit 44175188c4
3 changed files with 8 additions and 13 deletions

View File

@@ -140,6 +140,9 @@ helpers.hasEnoughReputationFor = function(privilege, uid, callback) {
return callback(null, true);
}
}
// Does not satisfy any of those thresholds?
return callback(null, false);
} else {
callback(null, reputation >= parseInt(meta.config[privilege], 10));
}