clone: copy over the enableMailbox flag
This commit is contained in:
+4
-3
@@ -221,16 +221,17 @@ function add(id, appStoreId, manifest, location, domain, portBindings, data, cal
|
||||
const mailboxDomain = data.mailboxDomain || null;
|
||||
const reverseProxyConfigJson = data.reverseProxyConfig ? JSON.stringify(data.reverseProxyConfig) : null;
|
||||
const servicesConfigJson = data.servicesConfig ? JSON.stringify(data.servicesConfig) : null;
|
||||
const enableMailbox = data.enableMailbox || false;
|
||||
const icon = data.icon || null;
|
||||
|
||||
let queries = [];
|
||||
|
||||
queries.push({
|
||||
query: 'INSERT INTO apps (id, appStoreId, manifestJson, installationState, runState, accessRestrictionJson, memoryLimit, cpuShares, '
|
||||
+ 'sso, debugModeJson, mailboxName, mailboxDomain, label, tagsJson, reverseProxyConfigJson, servicesConfigJson, icon) '
|
||||
+ ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
|
||||
+ 'sso, debugModeJson, mailboxName, mailboxDomain, label, tagsJson, reverseProxyConfigJson, servicesConfigJson, icon, enableMailbox) '
|
||||
+ ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
|
||||
args: [ id, appStoreId, manifestJson, installationState, runState, accessRestrictionJson, memoryLimit, cpuShares,
|
||||
sso, debugModeJson, mailboxName, mailboxDomain, label, tagsJson, reverseProxyConfigJson, servicesConfigJson, icon ]
|
||||
sso, debugModeJson, mailboxName, mailboxDomain, label, tagsJson, reverseProxyConfigJson, servicesConfigJson, icon, enableMailbox ]
|
||||
});
|
||||
|
||||
queries.push({
|
||||
|
||||
+4
-1
@@ -749,6 +749,7 @@ function install(data, auditSource, callback) {
|
||||
overwriteDns = 'overwriteDns' in data ? data.overwriteDns : false,
|
||||
skipDnsSetup = 'skipDnsSetup' in data ? data.skipDnsSetup : false,
|
||||
appStoreId = data.appStoreId,
|
||||
enableMailbox = 'enabledMailbox' in data ? data.enableMailbox : true,
|
||||
manifest = data.manifest;
|
||||
|
||||
let error = manifestFormat.parse(manifest);
|
||||
@@ -817,6 +818,7 @@ function install(data, auditSource, callback) {
|
||||
label,
|
||||
tags,
|
||||
icon,
|
||||
enableMailbox,
|
||||
runState: exports.RSTATE_RUNNING,
|
||||
installationState: exports.ISTATE_PENDING_INSTALL
|
||||
};
|
||||
@@ -1696,7 +1698,8 @@ function clone(app, data, user, auditSource, callback) {
|
||||
label: app.label ? `${app.label}-clone` : '',
|
||||
tags: app.tags,
|
||||
enableAutomaticUpdate: app.enableAutomaticUpdate,
|
||||
icon: icons.icon
|
||||
icon: icons.icon,
|
||||
enableMailbox: app.enableMailbox
|
||||
};
|
||||
|
||||
appdb.add(newAppId, appStoreId, manifest, location, domain, translatePortBindings(portBindings, manifest), data, function (error) {
|
||||
|
||||
@@ -145,6 +145,7 @@ function install(req, res, next) {
|
||||
|
||||
if ('overwriteDns' in req.body && typeof req.body.overwriteDns !== 'boolean') return next(new HttpError(400, 'overwriteDns must be boolean'));
|
||||
if ('skipDnsSetup' in req.body && typeof req.body.skipDnsSetup !== 'boolean') return next(new HttpError(400, 'skipDnsSetup must be boolean'));
|
||||
if ('enableMailbox' in req.body && typeof req.body.enableMailbox !== 'boolean') return next(new HttpError(400, 'enableMailbox must be boolean'));
|
||||
|
||||
apps.downloadManifest(data.appStoreId, data.manifest, function (error, appStoreId, manifest) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
Reference in New Issue
Block a user