From b62d4387a62a260812b02d87c30e8fd4ed04d1b6 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 6 Oct 2020 18:36:13 +0530 Subject: [PATCH] drop support for SET_DEFAULT_STORAGE_LIMIT it's redundant now that we support persistent admin decrees and it was never exposed via the UI anyway --- lib/commands/admin-rpc.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/commands/admin-rpc.js b/lib/commands/admin-rpc.js index bfd273f38..415bf5ef5 100644 --- a/lib/commands/admin-rpc.js +++ b/lib/commands/admin-rpc.js @@ -175,23 +175,6 @@ var restoreArchivedDocument = function (Env, Server, cb) { cb("NOT_IMPLEMENTED"); }; -// CryptPad_AsyncStore.rpc.send('ADMIN', ['SET_DEFAULT_STORAGE_LIMIT', 1024 * 1024 * 1024 /* 1GB */], console.log) -// XXX remove -var setDefaultStorageLimit = function (Env, Server, cb, data) { - var value = Array.isArray(data) && data[1]; - if (typeof(value) !== 'number' || value <= 0) { return void cb('EINVAL'); } - var previous = Env.defaultStorageLimit; - var change = { - previous: previous, - current: value, - }; - - Env.defaultStorageLimit = value; - Env.Log.info('DEFAULT_STORAGE_LIMIT_UPDATE', change); - - cb(void 0, change); -}; - // CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['RESTRICT_REGISTRATION', [true]]], console.log) var adminDecree = function (Env, Server, cb, data, safeKey) { var value = data[1]; @@ -251,7 +234,6 @@ var commands = { SHUTDOWN: shutdown, GET_FILE_DESCRIPTOR_COUNT: getFileDescriptorCount, GET_FILE_DESCRIPTOR_LIMIT: getFileDescriptorLimit, - SET_DEFAULT_STORAGE_LIMIT: setDefaultStorageLimit, GET_CACHE_STATS: getCacheStats, ARCHIVE_DOCUMENT: archiveDocument,