We can skip user.scope here since we will intersect at access time anyway

This commit is contained in:
Girish Ramakrishnan
2018-06-17 15:11:10 -07:00
parent 669a1498aa
commit c3631350cf
+1 -1
View File
@@ -116,7 +116,7 @@ function initialize() {
var token = tokendb.generateToken();
var expires = Date.now() + constants.DEFAULT_TOKEN_EXPIRATION;
var scope = accesscontrol.intersectScope(user.scope, client.scope);
var scope = accesscontrol.canonicalScope(client.scope);
tokendb.add(token, user.id, client.id, expires, scope, function (error) {
if (error) return callback(error);