Remove all .admin usage
This commit is contained in:
@@ -336,10 +336,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
this._userInfo.role = userInfo.role;
|
||||
this._userInfo.source = userInfo.source;
|
||||
this._userInfo.avatarUrl = userInfo.avatarUrl + '?s=128&default=mp&ts=' + Date.now(); // we add the timestamp to avoid caching
|
||||
|
||||
// TODO remove this
|
||||
this._userInfo.admin = userInfo.role === ROLES.OWNER || userInfo.role === ROLES.ADMIN;
|
||||
|
||||
this._userInfo.isAtLeastOwner = [ ROLES.OWNER ].indexOf(userInfo.role) !== -1;
|
||||
this._userInfo.isAtLeastAdmin = [ ROLES.OWNER, ROLES.ADMIN ].indexOf(userInfo.role) !== -1;
|
||||
this._userInfo.isAtLeastUserManager = [ ROLES.OWNER, ROLES.ADMIN, ROLES.USER_MANAGER ].indexOf(userInfo.role) !== -1;
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
|
||||
|
||||
// NOTE: this function is exported and called from the appstore.js
|
||||
$scope.updateSubscriptionStatus = function () {
|
||||
if (!Client.getUserInfo().admin) return;
|
||||
if (!Client.getUserInfo().isAtLeastAdmin) return;
|
||||
|
||||
Client.getSubscription(function (error, subscription) {
|
||||
if (error && error.statusCode === 412) return; // ignore if not yet registered
|
||||
|
||||
Reference in New Issue
Block a user