From 4916ce3529fff2a678b04e22d91089b592d722bc Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 18 Oct 2021 07:46:00 +0200 Subject: [PATCH] SuggestController: apply HostGroup restrictions --- application/controllers/SuggestController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/controllers/SuggestController.php b/application/controllers/SuggestController.php index c7db31ec..659c48c9 100644 --- a/application/controllers/SuggestController.php +++ b/application/controllers/SuggestController.php @@ -2,6 +2,7 @@ namespace Icinga\Module\Director\Controllers; +use Icinga\Module\Director\Restriction\HostgroupRestriction; use ipl\Html\Html; use Icinga\Exception\NotFoundError; use Icinga\Module\Director\Hook\ImportSourceHook; @@ -108,6 +109,8 @@ class SuggestController extends ActionController if ($type !== null) { $query->where('object_type = ?', $type); } + $restriction = new HostgroupRestriction($this->db(), $this->Auth()); + $restriction->filterHostsQuery($query); return $db->fetchCol($query); }