From beb7a75d5a9bb638473768bfa7c2e6ac2f51ab52 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 30 Mar 2021 11:52:04 -0400 Subject: [PATCH] Implement canView for Monitors --- web/includes/Monitor.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/includes/Monitor.php b/web/includes/Monitor.php index 6df3001de..9cbec2880 100644 --- a/web/includes/Monitor.php +++ b/web/includes/Monitor.php @@ -580,6 +580,11 @@ class Monitor extends ZM_Object { return ( $user && ($user['Monitors'] == 'Edit') && ( !$this->{'Id'} || visibleMonitor($this->{'Id'}) )); } + function canView() { + global $user; + return ( $user && ($user['Monitors'] != 'None') && ( !$this->{'Id'} || visibleMonitor($this->{'Id'}) )); + } + function TriggerOn() { $cmd = getZmuCommand(' -a -m '.$this->{'Id'}); $output = shell_exec($cmd);