From bcbfc066f6dce1f936d73cfdc63417944d231d59 Mon Sep 17 00:00:00 2001 From: Sean Greenawalt Date: Fri, 25 Apr 2025 21:35:43 -0400 Subject: [PATCH] Simplify enterprise patch --- patches/enterprise-license.patch | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/patches/enterprise-license.patch b/patches/enterprise-license.patch index e968073..4d68c04 100644 --- a/patches/enterprise-license.patch +++ b/patches/enterprise-license.patch @@ -1,28 +1,17 @@ diff --git a/src/main/java/stirling/software/SPDF/EE/LicenseKeyChecker.java b/src/main/java/stirling/software/SPDF/EE/LicenseKeyChecker.java -index d788504c..df83518d 100644 +index d788504c..70e65913 100644 --- a/src/main/java/stirling/software/SPDF/EE/LicenseKeyChecker.java +++ b/src/main/java/stirling/software/SPDF/EE/LicenseKeyChecker.java -@@ -44,20 +44,9 @@ public class LicenseKeyChecker { +@@ -44,9 +44,10 @@ public class LicenseKeyChecker { if (!applicationProperties.getPremium().isEnabled()) { premiumEnabledResult = License.NORMAL; } else { - String licenseKey = getLicenseKeyContent(applicationProperties.getPremium().getKey()); -- if (licenseKey != null) { ++ String licenseKey = ""; + if (licenseKey != null) { - premiumEnabledResult = licenseService.verifyLicense(licenseKey); -- if (License.ENTERPRISE == premiumEnabledResult) { -- log.info("License key is Enterprise."); -- } else if (License.PRO == premiumEnabledResult) { -- log.info("License key is Pro."); -- } else { -- log.info("License key is invalid, defaulting to non pro license."); -- } -- } else { -- log.error("Failed to obtain license key content."); -- premiumEnabledResult = License.NORMAL; -- } -+ premiousEnabledResult = License.ENTERPRISE; -+ applicationProperties.getEnterpriseEdition().setMaxUsers(Integer.MAX_VALUE); -+ log.info("License key is Enterprise."); - } - } - ++ premiumEnabledResult = License.ENTERPRISE; ++ applicationProperties.getEnterpriseEdition().setMaxUsers(Integer.MAX_VALUE); + if (License.ENTERPRISE == premiumEnabledResult) { + log.info("License key is Enterprise."); + } else if (License.PRO == premiumEnabledResult) {