Do not update task info for non-admins

This commit is contained in:
Johannes Zellner
2021-02-24 17:12:18 +01:00
parent cec4d51649
commit 2ae80312ee

View File

@@ -2003,6 +2003,17 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
if (error) return callback(error);
async.eachLimit(apps, 20, function (app, iteratorCallback) {
// only fetch if we have permissions
if (!that._userInfo.isAtLeastAdmin) {
app.progress = 0;
app.message = '';
app.taskMinutesActive = 0;
that._updateAppCache(app);
return iteratorCallback();
}
var getTaskFunc = app.taskId ? that.getTask.bind(null, app.taskId) : function (next) { return next(); };
getTaskFunc(function (error, task) {
if (error) return iteratorCallback(error);
@@ -2019,7 +2030,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
that._updateAppCache(app);
iteratorCallback(null);
iteratorCallback();
});
}, function iteratorDone(error) {
if (error) return callback(error);