Only a Cloudron owner can install/update/exec apps with the docker addon

this should have been part of f1975d8f2b
This commit is contained in:
Girish Ramakrishnan
2020-03-29 18:40:49 -07:00
parent 1da37b66d8
commit 7110240e73
3 changed files with 8 additions and 5 deletions

View File

@@ -1220,14 +1220,14 @@ function update(app, data, auditSource, callback) {
assert.strictEqual(typeof callback, 'function');
const skipBackup = !!data.skipBackup,
manifest = data.manifest,
appId = app.id;
appId = app.id,
manifest = data.manifest;
if (app.runState === exports.RSTATE_STOPPED) return callback(new BoxError(BoxError.BAD_STATE, 'Stopped apps cannot be updated'));
let error = checkAppState(app, exports.ISTATE_PENDING_UPDATE);
if (error) return callback(error);
if (app.runState === exports.RSTATE_STOPPED) return callback(new BoxError(BoxError.BAD_STATE, 'Stopped apps cannot be updated'));
error = manifestFormat.parse(manifest);
if (error) return callback(new BoxError(BoxError.BAD_FIELD, 'Manifest error:' + error.message));