From 464c01ad80790e0e7f474ec4c50f87329857c099 Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 26 Feb 2024 14:22:05 +0300 Subject: [PATCH 1/3] feat: if editors are available only for any group, don't add scripts --- lib/hookhandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hookhandler.php b/lib/hookhandler.php index b1ca06e5..36c6b465 100644 --- a/lib/hookhandler.php +++ b/lib/hookhandler.php @@ -40,7 +40,7 @@ public static function publicPage() { $appConfig = new AppConfig($appName); - if (!empty($appConfig->getDocumentServerUrl()) && $appConfig->settingsAreSuccessful()) { + if (!empty($appConfig->getDocumentServerUrl()) && $appConfig->settingsAreSuccessful() && empty($appConfig->getLimitGroups())) { Util::addScript("onlyoffice", "main"); Util::addScript("onlyoffice", "share"); From 66407cb546c0a9ee081b2ee14623731e0280b62b Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 26 Feb 2024 14:22:18 +0300 Subject: [PATCH 2/3] refactor: use empty() instead of count() for check limitGroups --- lib/appconfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/appconfig.php b/lib/appconfig.php index 4928a17f..f2cc4691 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -1070,7 +1070,7 @@ public function isUserAllowedToUse($userId = null) { $groups = $this->getLimitGroups(); // no group set -> all users are allowed - if (\count($groups) === 0) { + if (empty($groups)) { return true; } From af8cabfb0ddc5759896a50637450f73c2a82d405 Mon Sep 17 00:00:00 2001 From: rivexe Date: Mon, 26 Feb 2024 14:22:45 +0300 Subject: [PATCH 3/3] docs: fix guest redirect to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d331cb45..67eeae49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - offline viewer for share link - updatable list of supported formats - filling pdf instead oform +- fixed guest redirect when limiting the app to groups ## Added - reference data from coediting