ShowController: Restrict the display of single contacts

refs #9009
This commit is contained in:
Johannes Meyer 2015-06-15 16:04:14 +02:00
parent 32c5d5a1ee
commit efc52e3342
1 changed files with 2 additions and 0 deletions

View File

@ -131,6 +131,7 @@ class Monitoring_ShowController extends Controller
'contact_notify_host_downtime', 'contact_notify_host_downtime',
)); ));
$query->where('contact_name', $contactName); $query->where('contact_name', $contactName);
$this->applyRestriction('monitoring/filter/objects', $query);
$contact = $query->getQuery()->fetchRow(); $contact = $query->getQuery()->fetchRow();
if ($contact) { if ($contact) {
@ -153,6 +154,7 @@ class Monitoring_ShowController extends Controller
)); ));
$notifications->where('contact_object_id', $contact->contact_object_id); $notifications->where('contact_object_id', $contact->contact_object_id);
$this->applyRestriction('monitoring/filter/objects', $notifications);
$this->view->notifications = $notifications; $this->view->notifications = $notifications;
$this->setupLimitControl(); $this->setupLimitControl();
$this->setupPaginationControl($this->view->notifications); $this->setupPaginationControl($this->view->notifications);