Remove all .admin usage

This commit is contained in:
Johannes Zellner
2020-02-24 17:29:20 +01:00
parent 2674160acc
commit 7ce4effc2d
6 changed files with 9 additions and 13 deletions

View File

@@ -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;