Remove inaccessible search results
authorAlexander Ebert <ebert@woltlab.com>
Mon, 22 Feb 2021 22:39:56 +0000 (23:39 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 22 Feb 2021 22:39:56 +0000 (23:39 +0100)
wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php
wcfsetup/install/files/lib/system/search/acp/UserGroupOptionACPSearchResultProvider.class.php

index c7ec7cfe30d0993cb9aad638b5dd5969e7a4f3e0..c45e8dc41132f42c4c81f3b2027b97d581e4cf5c 100644 (file)
@@ -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
index 01d8bfa00af9ed0e4a0a0dc804af93ab0fbf0833..5ab909a3ade6bdf0a392aba634649e3abc9476cf 100644 (file)
@@ -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