mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
ObjectsTable: allow to filter any type by name
Not used yet, will make it easy to create restrictions like director/host/filter-by-name = "*.dev.example.com"
This commit is contained in:
parent
ad88207d84
commit
7525a7b0f6
@ -6,6 +6,7 @@ use Icinga\Authentication\Auth;
|
||||
use Icinga\Module\Director\Db;
|
||||
use Icinga\Module\Director\Db\IcingaObjectFilterHelper;
|
||||
use Icinga\Module\Director\Objects\IcingaObject;
|
||||
use Icinga\Module\Director\Restriction\FilterByNameRestriction;
|
||||
use Icinga\Module\Director\Restriction\HostgroupRestriction;
|
||||
use Icinga\Module\Director\Restriction\ObjectRestriction;
|
||||
use dipl\Html\Link;
|
||||
@ -184,8 +185,12 @@ class ObjectsTable extends ZfQueryBasedTable
|
||||
|
||||
protected function loadRestrictions()
|
||||
{
|
||||
$db = $this->connection();
|
||||
$auth = $this->getAuth();
|
||||
|
||||
return [
|
||||
new HostgroupRestriction($this->connection(), $this->getAuth())
|
||||
new HostgroupRestriction($db, $auth),
|
||||
new FilterByNameRestriction($db, $auth, $this->getDummyObject()->getShortTableName())
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user