Implement canView for Monitors

This commit is contained in:
Isaac Connor 2021-03-30 11:52:04 -04:00
parent aeb98ec790
commit beb7a75d5a
1 changed files with 5 additions and 0 deletions

View File

@ -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);