diff --git a/lib/commands/admin-rpc.js b/lib/commands/admin-rpc.js index 59750571e..532deed03 100644 --- a/lib/commands/admin-rpc.js +++ b/lib/commands/admin-rpc.js @@ -300,6 +300,7 @@ var setLastEviction = function (Env, Server, cb, data, unsafeKey) { var instanceStatus = function (Env, Server, cb) { cb(void 0, { restrictRegistration: Env.restrictRegistration, + disableEmbedding: Env.disableEmbedding, launchTime: Env.launchTime, currentTime: +new Date(), diff --git a/lib/decrees.js b/lib/decrees.js index 5f599705e..c1e417ed5 100644 --- a/lib/decrees.js +++ b/lib/decrees.js @@ -48,6 +48,8 @@ ADD_INVITE REVOKE_INVITE REDEEM_INVITE +DISABLE_EMBEDDING + // 2.0 Env.DEV_MODE || Env.FRESH_MODE, @@ -87,6 +89,9 @@ var makeBooleanSetter = function (attr) { }; }; +// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['DISABLE_EMBEDDING', [true]]], console.log) +commands.DISABLE_EMBEDDING = makeBooleanSetter('disableEmbedding'); + // CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['RESTRICT_REGISTRATION', [true]]], console.log) commands.RESTRICT_REGISTRATION = makeBooleanSetter('restrictRegistration'); diff --git a/server.js b/server.js index 73f63a3e1..7d08c3656 100644 --- a/server.js +++ b/server.js @@ -249,6 +249,7 @@ var serveConfig = makeRouteCache(function (host) { premiumUploadSize: Env.premiumUploadSize, restrictRegistration: Env.restrictRegistration, httpSafeOrigin: Env.httpSafeOrigin, + disableEmbedding: Env.disableEmbedding, }, null, '\t'), '});' ].join(';\n')