diff options
Diffstat (limited to 'library/Director/Restriction/HostgroupRestriction.php')
-rw-r--r-- | library/Director/Restriction/HostgroupRestriction.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/Director/Restriction/HostgroupRestriction.php b/library/Director/Restriction/HostgroupRestriction.php index 1a6792b..f2face4 100644 --- a/library/Director/Restriction/HostgroupRestriction.php +++ b/library/Director/Restriction/HostgroupRestriction.php @@ -2,7 +2,7 @@ namespace Icinga\Module\Director\Restriction; -use Icinga\Exception\ProgrammingError; +use Icinga\Module\Director\Auth\Restriction; use Icinga\Module\Director\Db\IcingaObjectFilterHelper; use Icinga\Module\Director\Objects\IcingaHost; use Icinga\Module\Director\Objects\IcingaHostGroup; @@ -11,7 +11,7 @@ use Zend_Db_Select as ZfSelect; class HostgroupRestriction extends ObjectRestriction { - protected $name = 'director/filter/hostgroups'; + protected $name = Restriction::FILTER_HOSTGROUPS; public function allows(IcingaObject $object) { @@ -93,7 +93,7 @@ class HostgroupRestriction extends ObjectRestriction ['id'] )->where('id = ?', $hostgroup->id); - $this->filterHostGroupsQuery($query); + $this->filterHostGroupsQuery($query, 'h'); return (int) $this->db->fetchOne($query) === (int) $hostgroup->get('id'); } @@ -141,7 +141,7 @@ class HostgroupRestriction extends ObjectRestriction if (empty($groups)) { $query->where('(1 = 0)'); } else { - $query->where("${tableAlias}.object_name IN (?)", $groups); + $query->where("{$tableAlias}.object_name IN (?)", $groups); } } |