f44f01ba28
Refs #18
151 lines
5.6 KiB
Diff
151 lines
5.6 KiB
Diff
From ae791a4d73a613138a2fee024e04bf8009032617 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Hofbauer <alex@derhofbauer.at>
|
|
Date: Sun, 27 Dec 2020 21:49:37 +0100
|
|
Subject: [PATCH] Patch for license
|
|
|
|
---
|
|
Common/sources/commondefines.js | 4 ++--
|
|
Common/sources/constants.js | 2 +-
|
|
Common/sources/license.js | 16 ++++++++--------
|
|
DocService/sources/DocsCoServer.js | 5 +++--
|
|
DocService/sources/server.js | 1 -
|
|
FileConverter/sources/convertermaster.js | 1 -
|
|
Makefile | 2 +-
|
|
7 files changed, 15 insertions(+), 16 deletions(-)
|
|
|
|
diff --git a/Common/sources/commondefines.js b/Common/sources/commondefines.js
|
|
index a57f353..78edbd3 100644
|
|
--- a/Common/sources/commondefines.js
|
|
+++ b/Common/sources/commondefines.js
|
|
@@ -992,8 +992,8 @@ const c_oAscUnlockRes = {
|
|
Empty: 2
|
|
};
|
|
|
|
-const buildVersion = '4.1.2';
|
|
-const buildNumber = 37;
|
|
+const buildVersion = '6.2.2';
|
|
+const buildNumber = 21;
|
|
|
|
exports.TaskQueueData = TaskQueueData;
|
|
exports.CMailMergeSendData = CMailMergeSendData;
|
|
diff --git a/Common/sources/constants.js b/Common/sources/constants.js
|
|
index 2b79e02..738df37 100644
|
|
--- a/Common/sources/constants.js
|
|
+++ b/Common/sources/constants.js
|
|
@@ -70,7 +70,7 @@ exports.LICENSE_RESULT = {
|
|
ExpiredLimited: 11
|
|
};
|
|
|
|
-exports.LICENSE_CONNECTIONS = 20;
|
|
+exports.LICENSE_CONNECTIONS = 9999;
|
|
exports.LICENSE_EXPIRE_USERS_ONE_DAY = 24 * 60 * 60; // day in seconds
|
|
|
|
exports.AVS_OFFICESTUDIO_FILE_UNKNOWN = 0x0000;
|
|
diff --git a/Common/sources/license.js b/Common/sources/license.js
|
|
index 19f0b61..43adc9b 100644
|
|
--- a/Common/sources/license.js
|
|
+++ b/Common/sources/license.js
|
|
@@ -34,7 +34,7 @@
|
|
|
|
const constants = require('./constants');
|
|
|
|
-const buildDate = '6/29/2016';
|
|
+const buildDate = '2021-04-19T14:36:00.000Z';
|
|
const oBuildDate = new Date(buildDate);
|
|
|
|
exports.readLicense = function*() {
|
|
@@ -43,17 +43,17 @@ exports.readLicense = function*() {
|
|
count: 1,
|
|
type: c_LR.Success,
|
|
light: false,
|
|
- packageType: constants.PACKAGE_TYPE_OS,
|
|
+ packageType: constants.PACKAGE_TYPE_I,
|
|
mode: constants.LICENSE_MODE.None,
|
|
branding: false,
|
|
connections: constants.LICENSE_CONNECTIONS,
|
|
- customization: false,
|
|
+ customization: true,
|
|
usersCount: 0,
|
|
- usersExpire: constants.LICENSE_EXPIRE_USERS_ONE_DAY,
|
|
- hasLicense: false,
|
|
- plugins: false,
|
|
+ usersExpire: new Date("2099-01-01T23:59:59.000Z").getTime() / 1000,
|
|
+ hasLicense: true,
|
|
+ plugins: true,
|
|
buildDate: oBuildDate,
|
|
- endDate: null
|
|
+ endDate: "2099-01-01T23:59:59.000Z"
|
|
};
|
|
};
|
|
-exports.packageType = constants.PACKAGE_TYPE_OS;
|
|
+exports.packageType = constants.PACKAGE_TYPE_I;
|
|
diff --git a/DocService/sources/DocsCoServer.js b/DocService/sources/DocsCoServer.js
|
|
index bd209ea..9151489 100644
|
|
--- a/DocService/sources/DocsCoServer.js
|
|
+++ b/DocService/sources/DocsCoServer.js
|
|
@@ -103,6 +103,7 @@ const pubsubService = require('./pubsubRabbitMQ');
|
|
const queueService = require('./../../Common/sources/taskqueueRabbitMQ');
|
|
const rabbitMQCore = require('./../../Common/sources/rabbitMQCore');
|
|
const activeMQCore = require('./../../Common/sources/activeMQCore');
|
|
+const license = require('./../../Common/sources/license');
|
|
|
|
const editorDataStorage = require('./' + configCommon.get('services.CoAuthoring.server.editorDataStorage'));
|
|
let cfgEditor = JSON.parse(JSON.stringify(config.get('editor')));
|
|
@@ -162,7 +163,7 @@ let connections = []; // Активные соединения
|
|
let lockDocumentsTimerId = {};//to drop connection that can't unlockDocument
|
|
let pubsub;
|
|
let queue;
|
|
-let licenseInfo = {type: constants.LICENSE_RESULT.Error, light: false, branding: false, customization: false, plugins: false};
|
|
+let licenseInfo = license.readLicense().next().value;
|
|
let shutdownFlag = false;
|
|
|
|
const MIN_SAVE_EXPIRATION = 60000;
|
|
@@ -2976,7 +2977,7 @@ exports.install = function(server, callbackFunction) {
|
|
});
|
|
};
|
|
exports.setLicenseInfo = function(data) {
|
|
- licenseInfo = data;
|
|
+ logger.debug('Not updating license info', data)
|
|
};
|
|
exports.getLicenseInfo = function() {
|
|
return licenseInfo;
|
|
diff --git a/DocService/sources/server.js b/DocService/sources/server.js
|
|
index b623759..29574bd 100644
|
|
--- a/DocService/sources/server.js
|
|
+++ b/DocService/sources/server.js
|
|
@@ -129,7 +129,6 @@ try {
|
|
} catch (e) {
|
|
logger.warn('Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability');
|
|
}
|
|
-fs.watchFile(configCommon.get('license').get('license_file'), updateLicense);
|
|
setInterval(updateLicense, 86400000);
|
|
|
|
// Если захочется использовать 'development' и 'production',
|
|
diff --git a/FileConverter/sources/convertermaster.js b/FileConverter/sources/convertermaster.js
|
|
index c246bb8..9fe3d41 100644
|
|
--- a/FileConverter/sources/convertermaster.js
|
|
+++ b/FileConverter/sources/convertermaster.js
|
|
@@ -85,7 +85,6 @@ if (cluster.isMaster) {
|
|
|
|
updateLicense();
|
|
|
|
- fs.watchFile(configCommon.get('license').get('license_file'), updateLicense);
|
|
setInterval(updateLicense, 86400000);
|
|
} else {
|
|
const converter = require('./converter');
|
|
diff --git a/Makefile b/Makefile
|
|
index 40bf93e..1df9c10 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -83,7 +83,7 @@ DEBUG = $(BRANDING_DIR)/debug.js
|
|
.PHONY: all clean install uninstall build-date
|
|
|
|
.NOTPARALLEL:
|
|
-all: $(SPELLCHECKER_DICTIONARIES) $(TOOLS) $(SCHEMA) $(CORE_FONTS) $(LICENSE) $(WELCOME) $(INFO) build-date
|
|
+all: $(SCHEMA) $(LICENSE) $(WELCOME) $(INFO) build-date
|
|
|
|
build-date: $(GRUNT_FILES)
|
|
sed "s|\(const buildVersion = \).*|\1'${PRODUCT_VERSION}';|" -i $(COMMON_DEFINES_JS)
|
|
--
|
|
2.30.2
|
|
|