diff --git a/Common/sources/license.js b/Common/sources/license.js index 33836ac5..e872cffa 100644 --- a/Common/sources/license.js +++ b/Common/sources/license.js @@ -91,7 +91,7 @@ exports.readLicense = function*() { } res.light = (true === oLicense['light'] || 'true' === oLicense['light']); // Someone who likes to put json string instead of bool - res.branding = (true === oLicense['branding'] || 'true' === oLicense['branding']); // Someone who likes to put json string instead of bool + res.branding = getBranding(oLicense['branding']); if (oLicense.hasOwnProperty('connections')) { res.connections = oLicense['connections'] >> 0; } @@ -143,6 +143,10 @@ function getLicenseMode(mode) { const c_LM = constants.LICENSE_MODE; return 'developer' === mode ? c_LM.Developer : ('trial' === mode ? c_LM.Trial : c_LM.None); } +function getBranding(mode) { + // Someone who likes to put json string instead of bool + return ((typeof mode === 'string') ? 'true' === mode : (mode || 0)) - 0; +} function* _getFileState() { const val = yield utils.promiseRedis(redisClient, redisClient.hget, redisKeyLicense, redisKeyLicense);