From 8b749521bae833748e34f5bd4feefb7a90ab8876 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 15 Jun 2015 16:00:19 +0200 Subject: [PATCH] DowntimesController: Restrict display of downtimes refs #9009 --- .../application/controllers/DowntimesController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/DowntimesController.php b/modules/monitoring/application/controllers/DowntimesController.php index a1d210cc8..35950acfe 100644 --- a/modules/monitoring/application/controllers/DowntimesController.php +++ b/modules/monitoring/application/controllers/DowntimesController.php @@ -39,7 +39,7 @@ class Monitoring_DowntimesController extends Controller 'downtime_internal_id', (string)$this->params )); - $this->downtimes = $this->backend->select()->from('downtime', array( + $query = $this->backend->select()->from('downtime', array( 'id' => 'downtime_internal_id', 'objecttype' => 'object_type', 'comment' => 'downtime_comment', @@ -59,8 +59,10 @@ class Monitoring_DowntimesController extends Controller 'service_description', 'host_display_name', 'service_display_name' - ))->addFilter($this->filter)->getQuery()->fetchAll(); + ))->addFilter($this->filter); + $this->applyRestriction('monitoring/filter/objects', $query); + $this->downtimes = $query->getQuery()->fetchAll(); if (false === $this->downtimes) { throw new Zend_Controller_Action_Exception( $this->translate('Downtime not found')