mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
SuggestController: apply HostGroup restrictions
This commit is contained in:
parent
e29c025d64
commit
4916ce3529
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user