diff --git a/src/js/client.js b/src/js/client.js index 9eeb4ec75..f504915fe 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -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; }; /*