diff --git a/lib/commands/admin-rpc.js b/lib/commands/admin-rpc.js index 72b75720a..9278c09a6 100644 --- a/lib/commands/admin-rpc.js +++ b/lib/commands/admin-rpc.js @@ -218,6 +218,7 @@ var instanceStatus = function (Env, Server, cb) { launchTime: Env.launchTime, currentTime: +new Date(), + inactiveTime: Env.inactiveTime, accountRetentionTime: Env.accountRetentionTime, archiveRetentionTime: Env.archiveRetentionTime, diff --git a/lib/decrees.js b/lib/decrees.js index 7e5864fd5..d7983c79c 100644 --- a/lib/decrees.js +++ b/lib/decrees.js @@ -11,6 +11,12 @@ UPDATE_DEFAULT_STORAGE() SET_QUOTA(, limit) RM_QUOTA() +// INACTIVITY +SET_INACTIVE_TIME +SET_ACCOUNT_RETENTION_TIME +SET_ARCHIVE_RETENTION_TIME + +// UPLOADS SET_MAX_UPLOAD_SIZE SET_PREMIUM_UPLOAD_SIZE @@ -26,11 +32,6 @@ REVOKE_INVITE REDEEM_INVITE // 2.0 -UPDATE_INACTIVE_TIME -UPDATE_ACCOUNT_RETENTION_TIME -UPDATE_ARCHIVE_RETENTION_TIME - -// 3.0 Env.adminEmail Env.supportMailbox Env.DEV_MODE || Env.FRESH_MODE, @@ -111,8 +112,18 @@ commands.SET_PREMIUM_UPLOAD_SIZE = makeIntegerSetter('premiumUploadSize'); // CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['UPDATE_DEFAULT_STORAGE', [100 * 1024 * 1024]]], console.log) commands.UPDATE_DEFAULT_STORAGE = makeIntegerSetter('defaultStorageLimit'); +// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_LAST_EVICTION', [0]]], console.log) commands.SET_LAST_EVICTION = makeIntegerSetter('lastEviction'); +// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_INACTIVE_TIME', [90]]], console.log) +commands.SET_INACTIVE_TIME = makeIntegerSetter('inactiveTime'); + +// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_ARCHIVE_RETENTION_TIME', [30]]], console.log) +commands.SET_ARCHIVE_RETENTION_TIME = makeIntegerSetter('archiveRetentionTime'); + +// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_ACCOUNT_RETENTION_TIME', [365]]], console.log) +commands.SET_ACCOUNT_RETENTION_TIME = makeIntegerSetter('accountRetentionTime'); + var Quota = require("./commands/quota"); var Keys = require("./keys"); var Util = require("./common-util");