mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[refactoring] Remove unused in license 'light' and 'plugins' params
This commit is contained in:
@ -44,7 +44,6 @@ exports.readLicense = async function () {
|
||||
return [{
|
||||
count: 1,
|
||||
type: c_LR.Success,
|
||||
light: false,
|
||||
packageType: constants.PACKAGE_TYPE_OS,
|
||||
mode: constants.LICENSE_MODE.None,
|
||||
branding: false,
|
||||
@ -56,7 +55,6 @@ exports.readLicense = async function () {
|
||||
usersViewCount: 0,
|
||||
usersExpire: constants.LICENSE_EXPIRE_USERS_ONE_DAY,
|
||||
hasLicense: false,
|
||||
plugins: false,
|
||||
buildDate: oBuildDate,
|
||||
startDate: startDate,
|
||||
endDate: null,
|
||||
|
||||
@ -203,13 +203,8 @@ function fixTenantLicense(ctx, licenseInfo, licenseInfoTenant) {
|
||||
licenseInfoTenant.mode |= c_LM.Developer;
|
||||
errors.push('developer');
|
||||
}
|
||||
//can not turn off
|
||||
if (licenseInfo.light && !licenseInfoTenant.light) {
|
||||
licenseInfoTenant.light = licenseInfo.light;
|
||||
errors.push('light');
|
||||
}
|
||||
//can not turn on
|
||||
let flags = ['plugins', 'branding', 'customization'];
|
||||
let flags = ['branding', 'customization'];
|
||||
flags.forEach((flag) => {
|
||||
if (!licenseInfo[flag] && licenseInfoTenant[flag]) {
|
||||
licenseInfoTenant[flag] = licenseInfo[flag];
|
||||
@ -321,12 +316,6 @@ async function readLicenseTenant(ctx, licenseFile, baseVerifiedLicense) {
|
||||
if (true === oLicense['developer']) {
|
||||
res.mode |= c_LM.Developer;
|
||||
}
|
||||
if (oLicense.hasOwnProperty('light')) {
|
||||
res.light = (true === oLicense['light'] || 'true' === oLicense['light'] || 'True' === oLicense['light']); // Someone who likes to put json string instead of bool
|
||||
}
|
||||
if (oLicense.hasOwnProperty('plugins')) {
|
||||
res.plugins = true === oLicense['plugins'];
|
||||
}
|
||||
if (oLicense.hasOwnProperty('branding')) {
|
||||
res.branding = (true === oLicense['branding'] || 'true' === oLicense['branding'] || 'True' === oLicense['branding']); // Someone who likes to put json string instead of bool
|
||||
}
|
||||
|
||||
@ -1140,11 +1140,9 @@ exports.convertLicenseInfoToFileParams = function(licenseInfo) {
|
||||
} else {
|
||||
license.mode = '';
|
||||
}
|
||||
license.light = licenseInfo.light;
|
||||
license.branding = licenseInfo.branding;
|
||||
license.customization = licenseInfo.customization;
|
||||
license.advanced_api = licenseInfo.advancedApi;
|
||||
license.plugins = licenseInfo.plugins;
|
||||
license.connections = licenseInfo.connections;
|
||||
license.connections_view = licenseInfo.connectionsView;
|
||||
license.users_count = licenseInfo.usersCount;
|
||||
|
||||
Reference in New Issue
Block a user