diff --git a/src/api/web/middleware.js b/src/api/web/middleware.js index c9397ea07..d503c95e6 100644 --- a/src/api/web/middleware.js +++ b/src/api/web/middleware.js @@ -105,7 +105,12 @@ 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, allowed) { + let packageName = req.params.package; + if (req.params.scope) { + packageName = `@${req.params.scope}/${packageName}`; + } + + auth['allow_' + action](packageName, req.remote_user, function(error, allowed) { req.resume(); if (error) { next(error); diff --git a/src/webui/src/router.js b/src/webui/src/router.js index b148b5b96..5d2886b6e 100644 --- a/src/webui/src/router.js +++ b/src/webui/src/router.js @@ -13,7 +13,7 @@ const RouterApp = () => {
- +