User creation and edit apis don't take admin flag anymore
This commit is contained in:
+3
-5
@@ -755,7 +755,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
};
|
||||
|
||||
Client.prototype.getUpdateInfo = function (callback) {
|
||||
if (!this._userInfo.admin) return callback(new Error('Not allowed'));
|
||||
if (!this._userInfo.isAtLeastAdmin) return callback(new Error('Not allowed'));
|
||||
|
||||
get('/api/v1/cloudron/update', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
@@ -1464,7 +1464,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
var data = {
|
||||
email: user.email,
|
||||
displayName: user.displayName,
|
||||
admin: user.admin,
|
||||
role: user.role
|
||||
};
|
||||
|
||||
@@ -1483,7 +1482,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
email: user.email,
|
||||
displayName: user.displayName,
|
||||
fallbackEmail: user.fallbackEmail,
|
||||
admin: user.admin,
|
||||
active: user.active,
|
||||
permissions: user.permissions,
|
||||
role: user.role
|
||||
@@ -1750,7 +1748,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
if (error) return callback(error);
|
||||
|
||||
asyncForEach(apps, function (app, iteratorCallback) {
|
||||
var canManageApp = that._userInfo.admin;
|
||||
var canManageApp = that._userInfo.isAtLeastAdmin;
|
||||
|
||||
if (!canManageApp) {
|
||||
that._appPostProcess(app); // this will also set the correct iconUrl
|
||||
@@ -2280,7 +2278,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
};
|
||||
|
||||
Client.prototype.getSubscription = function (callback) {
|
||||
if (!this._userInfo.admin) return callback(new Error('Not allowed'));
|
||||
if (!this._userInfo.isAtLeastAdmin) return callback(new Error('Not allowed'));
|
||||
|
||||
get('/api/v1/appstore/subscription', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
|
||||
Reference in New Issue
Block a user