SuggestController: apply HostGroup restrictions

This commit is contained in:
Thomas Gelf 2021-10-18 07:46:00 +02:00
parent e29c025d64
commit 4916ce3529
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}