return false if not logged in in canView. defaultUser is global, need to tell it so.

pull/3669/merge
Isaac Connor 2023-02-27 17:01:58 -05:00
parent e1625f0360
commit 2e58ea1a42
1 changed files with 2 additions and 0 deletions

View File

@ -260,6 +260,7 @@ $group_permissions = null;
$monitor_permissions = null; # hash indexed by MonitorId
function visibleMonitor($mid) {
global $user;
if (!$user) return false;
global $monitor_permissions;
@ -474,6 +475,7 @@ if (ZM_OPT_USE_AUTH) {
}
} # end if token based auth
} else {
global $defaultUser;
$user = $defaultUser;
} # end if ZM_OPT_USE_AUTH
?>