modify varable name to accord with origin code

This commit is contained in:
Meeeeow 2017-04-22 16:33:56 +08:00
parent cb37b38ee4
commit 0a769008cf
1 changed files with 2 additions and 2 deletions

View File

@ -80,11 +80,11 @@ module.exports.allow = function(auth) {
return function(action) {
return function(req, res, next) {
req.pause();
auth['allow_'+action](req.params.package, req.remote_user, function(error, is_allowed) {
auth['allow_'+action](req.params.package, req.remote_user, function(error, allowed) {
req.resume();
if (error) {
next(error)
} else if (is_allowed) {
} else if (allowed) {
next()
} else {
// last plugin (that's our built-in one) returns either