Set the scope for a token basedon what the user has access to

This commit is contained in:
Girish Ramakrishnan
2018-04-30 21:21:18 -07:00
parent 1432d90f37
commit 9789966017
3 changed files with 18 additions and 4 deletions

View File

@@ -320,6 +320,7 @@ function getUser(userId, callback) {
result.groupIds = groupIds;
result.admin = groupIds.indexOf(constants.ADMIN_GROUP_ID) !== -1;
result.scope = result.admin ? '*' : 'profile';
return callback(null, result);
});