From 74bb946a914864c1ba12ae96f2bee4e328e91ad4 Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Sat, 11 Apr 2015 23:18:04 +0300 Subject: [PATCH] fix freeze in web interface on acl check --- lib/index-web.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/index-web.js b/lib/index-web.js index 3111ac6bf..34ff8c662 100644 --- a/lib/index-web.js +++ b/lib/index-web.js @@ -50,17 +50,7 @@ module.exports = function(config, auth, storage) { if (err) throw err // that function shouldn't produce any async.filterSeries(packages, function(package, cb) { auth.allow_access(package.name, req.remote_user, function(err, allowed) { - if (err) { - if (err.status && String(err.status).match(/^4\d\d$/)) { - // auth plugin returns 4xx user error, - // that's equivalent of !allowed basically - allowed = false - } else { - return cb(err) - } - } - - return allowed + cb(!err && allowed) }) }, function(packages) { next(template({