move wellKnownJson to domains
after some more thought: * If app moves to another location, user has to remember to move all this config * It's not really associated with an app. It's to do with the domain info * We can put some hints in the UI if app is missing. part of #703
This commit is contained in:
19
src/apps.js
19
src/apps.js
@@ -20,7 +20,6 @@ exports = module.exports = {
|
||||
setMemoryLimit,
|
||||
setCpuShares,
|
||||
setMounts,
|
||||
setWellKnown,
|
||||
setAutomaticBackup,
|
||||
setAutomaticUpdate,
|
||||
setReverseProxyConfig,
|
||||
@@ -406,7 +405,7 @@ function removeInternalFields(app) {
|
||||
'location', 'domain', 'fqdn', 'mailboxName', 'mailboxDomain',
|
||||
'accessRestriction', 'manifest', 'portBindings', 'iconUrl', 'memoryLimit', 'cpuShares',
|
||||
'sso', 'debugMode', 'reverseProxyConfig', 'enableBackup', 'creationTime', 'updateTime', 'ts', 'tags',
|
||||
'label', 'alternateDomains', 'env', 'enableAutomaticUpdate', 'dataDir', 'mounts', 'wellKnown');
|
||||
'label', 'alternateDomains', 'env', 'enableAutomaticUpdate', 'dataDir', 'mounts');
|
||||
}
|
||||
|
||||
// non-admins can only see these
|
||||
@@ -983,22 +982,6 @@ function setMounts(app, mounts, auditSource, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function setWellKnown(app, wellKnown, auditSource, callback) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
assert.strictEqual(typeof wellKnown, 'object');
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
const appId = app.id;
|
||||
appdb.update(appId, { wellKnown }, function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
eventlog.add(eventlog.ACTION_APP_CONFIGURE, auditSource, { appId, app, wellKnown });
|
||||
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
function setEnvironment(app, env, auditSource, callback) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
assert.strictEqual(typeof env, 'object');
|
||||
|
||||
Reference in New Issue
Block a user