mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
handling case where user does not satisfy any of the privilege thresholds given to the hasEnoughReputationFor method
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user