tokenScope -> tokenScopes

This commit is contained in:
Girish Ramakrishnan
2018-06-18 15:09:16 -07:00
parent 4db703aeb1
commit 961220be3f
+3 -3
View File
@@ -225,14 +225,14 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
this._userInfo.fallbackEmail = userInfo.fallbackEmail;
this._userInfo.displayName = userInfo.displayName;
this._userInfo.twoFactorAuthenticationEnabled = userInfo.twoFactorAuthenticationEnabled;
this._userInfo.tokenScope = userInfo.tokenScope;
this._userInfo.tokenScopes = userInfo.tokenScopes;
this._userInfo.gravatar = 'https://www.gravatar.com/avatar/' + md5.createHash(userInfo.email) + '.jpg?s=24&d=mm';
this._userInfo.gravatarHuge = 'https://www.gravatar.com/avatar/' + md5.createHash(userInfo.email) + '.jpg?s=128&d=mm';
// clear and then set properties to keep angular happy
var caps = this._userInfo.caps;
for (var p in caps) delete caps[p];
userInfo.tokenScope.split(',').forEach(function (scope) {
userInfo.tokenScopes.forEach(function (scope) {
caps[scope] = true;
});
};
@@ -275,7 +275,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
};
Client.prototype.hasScope = function (scope) {
return this.getUserInfo().tokenScope.split(',').indexOf(scope) !== -1;
return this.getUserInfo().tokenScopes.indexOf(scope) !== -1;
};
/*