mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[license] Branding
Branding now int. Check string and boolean for old versions
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user