initial serverside components for 'disableEmbedding' functionality

pull/1/head
ansuz 3 years ago
parent 1a18eafb7f
commit ef6f98c149

@ -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(),

@ -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');

@ -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')

Loading…
Cancel
Save