Do not update task info for non-admins
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user