diff --git a/modules/monitoring/application/controllers/CommentController.php b/modules/monitoring/application/controllers/CommentController.php index 7ab331adc..59ad90fc7 100644 --- a/modules/monitoring/application/controllers/CommentController.php +++ b/modules/monitoring/application/controllers/CommentController.php @@ -25,7 +25,7 @@ class Monitoring_CommentController extends Controller { $commentId = $this->params->getRequired('comment_id'); - $this->comment = $this->backend->select()->from('comment', array( + $query = $this->backend->select()->from('comment', array( 'id' => 'comment_internal_id', 'objecttype' => 'object_type', 'comment' => 'comment_data', @@ -38,8 +38,10 @@ class Monitoring_CommentController extends Controller 'service_description', 'host_display_name', 'service_display_name' - ))->where('comment_internal_id', $commentId)->getQuery()->fetchRow(); + ))->where('comment_internal_id', $commentId); + $this->applyRestriction('monitoring/filter/objects', $query); + $this->comment = $query->getQuery()->fetchRow(); if ($this->comment === false) { $this->httpNotFound($this->translate('Comment not found')); }