Remove redundant requireAdmin

We already hand out scopes based on the user's access control
This commit is contained in:
Girish Ramakrishnan
2018-04-27 21:47:11 -07:00
parent 9789966017
commit bc4f9cf596
7 changed files with 116 additions and 109 deletions

View File

@@ -32,7 +32,7 @@ function scope(requestedScope) {
function (req, res, next) {
var error = accesscontrol.validateRequestedScopes(req.authInfo || null, requestedScopes);
if (error) return next(new HttpError(401, error.message));
if (error) return next(new HttpError(403, error.message));
next();
}