onlyoffice-document-server/disable-licensing-limits.patch

161 lines
5.9 KiB
Diff
Raw Permalink Normal View History

2024-08-24 21:49:56 -04:00
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/Common/sources/constants.js b/server/Common/sources/constants.js
index 3e8e7aaa..aad4d05f 100644
--- a/server/Common/sources/constants.js
+++ b/server/Common/sources/constants.js
@@ -85,8 +85,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/Common/sources/license.js b/server/Common/sources/license.js
index 5df8d693..3fd9de14 100644
--- a/server/Common/sources/license.js
+++ b/server/Common/sources/license.js
@@ -45,24 +45,24 @@ 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,
+ 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,
- plugins: false,
+ hasLicense: true,
+ plugins: true,
buildDate: oBuildDate,
startDate: startDate,
- endDate: null,
+ endDate: new Date("2099-01-01T23:59:59.000Z"),
customerId: "",
- alias: ""
+ alias: "community"
}, null];
};
-exports.packageType = constants.PACKAGE_TYPE_OS;
+exports.packageType = constants.PACKAGE_TYPE_I;
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/FileConverter/sources/convertermaster.js b/server/FileConverter/sources/convertermaster.js
index 46615032..6ce2d3e6 100644
--- a/server/FileConverter/sources/convertermaster.js
+++ b/server/FileConverter/sources/convertermaster.js
@@ -92,7 +92,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/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)
2024-08-24 22:12:28 -04:00
diff --git a/web-apps/apps/documenteditor/mobile/src/lib/patch.jsx b/web-apps/apps/documenteditor/mobile/src/lib/patch.jsx
2024-08-24 21:49:56 -04:00
index 963aca451..1ee48e856 100644
2024-08-24 22:12:28 -04:00
--- a/web-apps/apps/documenteditor/mobile/src/lib/patch.jsx
+++ b/web-apps/apps/documenteditor/mobile/src/lib/patch.jsx
2024-08-24 21:49:56 -04:00
@@ -4,7 +4,7 @@ const EditorUIController = () => {
};
EditorUIController.isSupportEditFeature = () => {
- return false
+ return true
};
EditorUIController.getToolbarOptions = () => {
2024-08-24 22:12:28 -04:00
diff --git a/web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx b/web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx
2024-08-24 21:49:56 -04:00
index ec7b37a2c..bfd879583 100644
2024-08-24 22:12:28 -04:00
--- a/web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx
+++ b/web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx
2024-08-24 21:49:56 -04:00
@@ -1,6 +1,6 @@
const EditorUIController = () => null;
-EditorUIController.isSupportEditFeature = () => false;
+EditorUIController.isSupportEditFeature = () => true;
export default EditorUIController;
2024-08-24 22:12:28 -04:00
diff --git a/web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx b/web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx
2024-08-24 21:49:56 -04:00
index ec7b37a2c..bfd879583 100644
2024-08-24 22:12:28 -04:00
--- a/web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx
+++ b/web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx
2024-08-24 21:49:56 -04:00
@@ -1,6 +1,6 @@
const EditorUIController = () => null;
-EditorUIController.isSupportEditFeature = () => false;
+EditorUIController.isSupportEditFeature = () => true;
export default EditorUIController;