0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-27 22:59:51 -05:00

fix freeze in web interface on acl check

This commit is contained in:
Alex Kocharin 2015-04-11 23:18:04 +03:00
parent 82756c3968
commit 74bb946a91

View file

@ -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({