update: all operators to update an app

previously, the update info was restricted to admins. this can now be queried
by any authenticated user. update information can be gathered from listing apps and
then checking against appstore anyway.
This commit is contained in:
Girish Ramakrishnan
2024-09-13 16:29:39 +02:00
parent 7b58fccb9f
commit a932a5251a
3 changed files with 5 additions and 5 deletions
+3 -4
View File
@@ -1400,8 +1400,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.getUpdateInfo = function (callback) {
if (!this._userInfo.isAtLeastAdmin) return callback(new Error('Not allowed'));
get('/api/v1/updater/updates', null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
@@ -2644,9 +2642,10 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
this.config(function (error, result) {
if (error) return callback(error);
that.getUpdateInfo(function (error, info) { // note: non-admin users may get access denied for this
if (!error) result.update = info.update; // attach update information to config object
that.getUpdateInfo(function (error, info) {
if (error) return callback(error);
result.update = info.update;
that.setConfig(result);
callback(null);
});