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:
parent
82756c3968
commit
74bb946a91
1 changed files with 1 additions and 11 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Reference in a new issue