From 8978ad9f79d3173a53a7b85f52ccec8411b27052 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 15 Nov 2016 12:47:54 +0100 Subject: [PATCH] Revert "DataView: Apply object restrictions to dynamic filter columns" This reverts commit 9ec471d34965198d2cfd5f2b9a6bbb76883023e0. refs #9993 --- .../library/Monitoring/DataView/DataView.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/modules/monitoring/library/Monitoring/DataView/DataView.php b/modules/monitoring/library/Monitoring/DataView/DataView.php index 1f63c78a8..e71469804 100644 --- a/modules/monitoring/library/Monitoring/DataView/DataView.php +++ b/modules/monitoring/library/Monitoring/DataView/DataView.php @@ -5,7 +5,6 @@ namespace Icinga\Module\Monitoring\DataView; use IteratorAggregate; use Icinga\Application\Hook; -use Icinga\Authentication\Auth; use Icinga\Data\ConnectionInterface; use Icinga\Data\Filter\Filter; use Icinga\Data\Filter\FilterMatch; @@ -265,24 +264,12 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite return $columns; } - $restriction = Filter::matchAny(); - $restrictions = Auth::getInstance()->getRestrictions('monitoring/filter/objects'); - foreach ($restrictions as $filter) { - if ($filter === '*') { - $restriction = Filter::matchAny(); - break; - } - $restriction->addFilter(Filter::fromQueryString($filter)); - } - $query = MonitoringBackend::instance() ->select() ->from('customvar', array('varname', 'object_type')) ->where('is_json', 0) ->where('object_type_id', array(1, 2)) - ->applyFilter($restriction) ->getQuery()->group(array('varname', 'object_type')); - foreach ($query as $row) { if ($row->object_type === 'host') { $label = t('Host') . ' ' . ucwords(str_replace('_', ' ', $row->varname));