custom: remove backups.configurable
This commit is contained in:
@@ -127,11 +127,6 @@ function getBackupConfig(req, res, next) {
|
||||
settings.getBackupConfig(function (error, backupConfig) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
// always send provider as it is used by the UI to figure if backups are disabled ('noop' backend)
|
||||
if (!custom.spec().backups.configurable) {
|
||||
return next(new HttpSuccess(200, { provider: backupConfig.provider }));
|
||||
}
|
||||
|
||||
next(new HttpSuccess(200, backups.removePrivateFields(backupConfig)));
|
||||
});
|
||||
}
|
||||
@@ -139,8 +134,6 @@ function getBackupConfig(req, res, next) {
|
||||
function setBackupConfig(req, res, next) {
|
||||
assert.strictEqual(typeof req.body, 'object');
|
||||
|
||||
if (!custom.spec().backups.configurable) return next(new HttpError(405, 'feature disabled by admin'));
|
||||
|
||||
if (typeof req.body.provider !== 'string') return next(new HttpError(400, 'provider is required'));
|
||||
if (typeof req.body.retentionSecs !== 'number') return next(new HttpError(400, 'retentionSecs is required'));
|
||||
if (typeof req.body.intervalSecs !== 'number') return next(new HttpError(400, 'intervalSecs is required'));
|
||||
|
||||
Reference in New Issue
Block a user