Remove scope from users.get

This commit is contained in:
Girish Ramakrishnan
2018-06-17 15:25:41 -07:00
parent db8b6838bb
commit 156ffb40c9
7 changed files with 33 additions and 54 deletions
+2 -3
View File
@@ -9,8 +9,7 @@ exports = module.exports = {
disableTwoFactorAuthentication: disableTwoFactorAuthentication
};
var accesscontrol = require('../accesscontrol.js'),
assert = require('assert'),
var assert = require('assert'),
HttpError = require('connect-lastmile').HttpError,
HttpSuccess = require('connect-lastmile').HttpSuccess,
users = require('../users.js'),
@@ -31,7 +30,7 @@ function get(req, res, next) {
email: req.user.email,
fallbackEmail: req.user.fallbackEmail,
admin: req.user.admin,
scope: accesscontrol.canonicalScope(req.authInfo.scope), // this returns the token scope and not the user's scope
tokenScope: req.authInfo.authorizedScope,
displayName: req.user.displayName,
twoFactorAuthenticationEnabled: req.user.twoFactorAuthenticationEnabled
}));