From 8507f7711636bf6e9c4dfa543c9389b19e63a93b Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 30 May 2017 16:27:42 +0200 Subject: [PATCH] throw if adminEmail and allowSubscriptions are not compatible --- rpc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpc.js b/rpc.js index fc204d87c..f108b1ab8 100644 --- a/rpc.js +++ b/rpc.js @@ -373,7 +373,10 @@ var getHash = function (Env, publicKey, cb) { // To each key is associated an object containing the 'limit' value and a 'note' explaining that limit var limits = {}; var updateLimits = function (config, publicKey, cb) { - if (config.adminEmail === false && config.allowSubscriptions === false) { return; } + if (config.adminEmail === false) { + if (config.allowSubscriptions === false) { return; } + throw new Error("allowSubscriptions must be false if adminEmail is false"); + } if (typeof cb !== "function") { cb = function () {}; } var defaultLimit = typeof(config.defaultStorageLimit) === 'number'?