Apply restrictions example extended to hostgroup view

This commit is contained in:
Thomas Gelf 2014-01-22 16:19:15 +00:00
parent 977b360b66
commit 6d59f242a7
1 changed files with 3 additions and 2 deletions

View File

@ -340,6 +340,7 @@ class Monitoring_ListController extends MonitoringController
'services_pending'
)
)->getQuery();
$this->applyRestrictions($query);
$this->handleFormatRequest($query);
$this->view->hostgroups = $query->paginate();
$this->setupSortControl(array(
@ -384,11 +385,11 @@ class Monitoring_ListController extends MonitoringController
foreach ($this->getRestrictions('monitoring/filter') as $restriction) {
parse_str($restriction, $filter);
foreach ($filter as $k => $v) {
// if ($query->isValidFilterTarget($k)) {
if ($query->isValidFilterTarget($k)) {
// TODO: This is NOT enough. We need to fix filters and get
// applyAuthFilters back.
$query->where($k, $v);
// }
}
}
}
return $query;