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