From: Alexander Ebert Date: Mon, 22 Feb 2021 22:39:56 +0000 (+0100) Subject: Remove inaccessible search results X-Git-Tag: 5.3.5~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f66c621fe3ca2cf3242c53886d5e1b12b6a96c1;p=GitHub%2FWoltLab%2FWCF.git Remove inaccessible search results --- 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