From 9f66c621fe3ca2cf3242c53886d5e1b12b6a96c1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 22 Feb 2021 23:39:56 +0100 Subject: [PATCH] Remove inaccessible search results --- .../system/search/acp/OptionACPSearchResultProvider.class.php | 4 ++++ .../acp/UserGroupOptionACPSearchResultProvider.class.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php b/wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php index c7ec7cfe30..c45e8dc411 100644 --- a/wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php +++ b/wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php @@ -26,6 +26,10 @@ class OptionACPSearchResultProvider extends AbstractCategorizedACPSearchResultPr * @inheritDoc */ public function search($query) { + if (!WCF::getSession()->getPermission('admin.configuration.canEditOption')) { + return []; + } + $results = []; // search by language item diff --git a/wcfsetup/install/files/lib/system/search/acp/UserGroupOptionACPSearchResultProvider.class.php b/wcfsetup/install/files/lib/system/search/acp/UserGroupOptionACPSearchResultProvider.class.php index 01d8bfa00a..5ab909a3ad 100644 --- a/wcfsetup/install/files/lib/system/search/acp/UserGroupOptionACPSearchResultProvider.class.php +++ b/wcfsetup/install/files/lib/system/search/acp/UserGroupOptionACPSearchResultProvider.class.php @@ -25,6 +25,10 @@ class UserGroupOptionACPSearchResultProvider extends AbstractCategorizedACPSearc * @inheritDoc */ public function search($query) { + if (!WCF::getSession()->getPermission('admin.user.canEditGroup')) { + return []; + } + $results = []; // search by language item -- 2.20.1