From 5ee269eef8bd02d066151deaa4d8c0fe6b6cbce4 Mon Sep 17 00:00:00 2001 Patch-Source: https://github.com/xbeeant/onlyoffice-ce-docker-license From: xbeeant Date: Tue, 15 Nov 2022 01:04:46 -0500 Subject: onlyoffice-ce-docker-license This patches OnlyOffice Docs server with mobile editing enabled in the Nextcloud apps for an unlimited amount of concurrent users. Background: Just about two months after Nextcloud released their partnership with Ascensio and featured a community version of OnlyOffice, the latter decided to remove support for mobile editing of documents. This affected the Nextcloud app, killing a feature that was previously marketed by both companies. The changes were executed without any prior notice and alienated quite a lot of home users, who would now be forced to pay more than €1.000 to unlock that previously free feature. Only after some outcries Ascensio deigned to release a statement and a new, albeit "limited", offer of €90 for home servers. This offer has since expired and their licensing tier suggests current licenses are valid for one year, starting at about €140. In my opinion these deceptive practices of advertising a feature only to take it away are unacceptable for a company presenting itself and their products as open source. --- diff --git a/server/DocService/sources/server.js b/server/DocService/sources/server.js index 76303af9..9d2e6888 100644 --- a/server/DocService/sources/server.js +++ b/server/DocService/sources/server.js @@ -129,7 +129,7 @@ if (!(cfgTokenEnableBrowser && cfgTokenEnableRequestInbox && cfgTokenEnableReque } updateLicense(); -fs.watchFile(cfgLicenseFile, updateLicense); +// fs.watchFile(cfgLicenseFile, updateLicense); setInterval(updateLicense, 86400000); try { diff --git a/server/Makefile b/server/Makefile index e8e1308f..23f7e2ef 100644 --- a/server/Makefile +++ b/server/Makefile @@ -87,7 +87,7 @@ DEBUG = $(BRANDING_DIR)/debug.js .PHONY: all clean install uninstall build-date .NOTPARALLEL: -all: $(SPELLCHECKER_DICTIONARIES) $(TOOLS) $(SCHEMA) $(CORE_FONTS) $(DOCUMENT_TEMPLATES) $(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) diff --git a/web-apps/apps/documenteditor/mobile/src/lib/patch.jsx b/web-apps/apps/documenteditor/mobile/src/lib/patch.jsx index 963aca451..1ee48e856 100644 --- a/web-apps/apps/documenteditor/mobile/src/lib/patch.jsx +++ b/web-apps/apps/documenteditor/mobile/src/lib/patch.jsx @@ -4,7 +4,7 @@ const EditorUIController = () => { }; EditorUIController.isSupportEditFeature = () => { - return false + return true }; EditorUIController.getToolbarOptions = () => { diff --git a/web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx b/web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx index ec7b37a2c..bfd879583 100644 --- a/web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx +++ b/web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx @@ -1,6 +1,6 @@ const EditorUIController = () => null; -EditorUIController.isSupportEditFeature = () => false; +EditorUIController.isSupportEditFeature = () => true; export default EditorUIController; diff --git a/web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx b/web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx index ec7b37a2c..bfd879583 100644 --- a/web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx +++ b/web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx @@ -1,6 +1,6 @@ const EditorUIController = () => null; -EditorUIController.isSupportEditFeature = () => false; +EditorUIController.isSupportEditFeature = () => true; export default EditorUIController; diff --git a/server/Common/sources/constants.js b/server/Common/sources/constants.js index 700696ff..d8bb9178 100644 --- a/server/Common/sources/constants.js +++ b/server/Common/sources/constants.js @@ -87,8 +87,8 @@ exports.LICENSE_RESULT = { NotBefore: 16 }; -exports.LICENSE_CONNECTIONS = 20; -exports.LICENSE_USERS = 3; +exports.LICENSE_CONNECTIONS = 999999; +exports.LICENSE_USERS = 999999; exports.LICENSE_EXPIRE_USERS_ONE_DAY = 24 * 60 * 60; // day in seconds exports.AVS_OFFICESTUDIO_FILE_UNKNOWN = 0x0000; diff --git a/server/FileConverter/sources/convertermaster.js b/server/FileConverter/sources/convertermaster.js index 2209e8c9..feef6247 100644 --- a/server/FileConverter/sources/convertermaster.js +++ b/server/FileConverter/sources/convertermaster.js @@ -90,7 +90,7 @@ if (cluster.isMaster) { updateLicense(); - fs.watchFile(cfgLicenseFile, updateLicense); + // fs.watchFile(cfgLicenseFile, updateLicense); setInterval(updateLicense, 86400000); } else { const converter = require('./converter'); diff --git a/server/Common/sources/license.js b/server/Common/sources/license.js index d43ee210..9e787b08 100644 --- a/server/Common/sources/license.js +++ b/server/Common/sources/license.js @@ -44,24 +44,24 @@ exports.readLicense = async function () { return [{ count: 1, type: c_LR.Success, - packageType: constants.PACKAGE_TYPE_OS, + packageType: constants.PACKAGE_TYPE_I, mode: constants.LICENSE_MODE.None, - branding: false, + branding: true, connections: constants.LICENSE_CONNECTIONS, connectionsView: constants.LICENSE_CONNECTIONS, - customization: false, - advancedApi: false, - usersCount: 0, - usersViewCount: 0, + customization: true, + advancedApi: true, + usersCount: constants.LICENSE_CONNECTIONS, + usersViewCount: constants.LICENSE_CONNECTIONS, usersExpire: constants.LICENSE_EXPIRE_USERS_ONE_DAY, - hasLicense: false, + hasLicense: true, buildDate: oBuildDate, startDate: startDate, - endDate: null, + endDate: new Date("2099-01-01T23:59:59.000Z"), customerId: "", - alias: "", + alias: "community", multitenancy: false }, null]; }; -exports.packageType = constants.PACKAGE_TYPE_OS; +exports.packageType = constants.PACKAGE_TYPE_I;