diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:48 +0000 |
commit | e6d4dfc040bbe3cb80a2ce65b82493b557f751fc (patch) | |
tree | 40bd6366b01b06f4d96fc8638f23a772263cb5e9 /library/Director/Restriction | |
parent | Releasing progress-linux version 1.10.2-2~progress7.99u1. (diff) | |
download | icingaweb2-module-director-e6d4dfc040bbe3cb80a2ce65b82493b557f751fc.tar.xz icingaweb2-module-director-e6d4dfc040bbe3cb80a2ce65b82493b557f751fc.zip |
Merging upstream version 1.11.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/Director/Restriction')
-rw-r--r-- | library/Director/Restriction/FilterByNameRestriction.php | 2 | ||||
-rw-r--r-- | library/Director/Restriction/HostgroupRestriction.php | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/library/Director/Restriction/FilterByNameRestriction.php b/library/Director/Restriction/FilterByNameRestriction.php index 8c3b256..aef28c4 100644 --- a/library/Director/Restriction/FilterByNameRestriction.php +++ b/library/Director/Restriction/FilterByNameRestriction.php @@ -30,7 +30,7 @@ class FilterByNameRestriction extends ObjectRestriction protected function setNameForType($type) { - $this->name = "director/${type}/filter-by-name"; + $this->name = "director/{$type}/filter-by-name"; } public function allows(IcingaObject $object) 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); } } |