From e09dfed0280be79b8f6cac21bb02fbc7ab6a2a31 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sun, 11 Apr 2010 09:52:59 +0000 Subject: [PATCH] only print interface/device links if the user is allowed to see that device/interface. (TODO: graph security) git-svn-id: http://www.observium.org/svn/observer/trunk@1060 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/functions.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index b358b77119..d900b06a99 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -284,7 +284,11 @@ function generateiflink($interface, $text=0, $type = NULL) if ($interface['ifAlias']) { $contents .= htmlentities($interface['ifAlias'] ."
" ); } $contents .= "
"; $link = overlib_link($url, $text, $contents, $class); - return $link; + if(interfacepermitted($interface['interface_id'])) { + return $link; + } else { + return fixifName($interface['label']); + } } function overlib_link($url, $text, $contents, $class) { @@ -312,6 +316,13 @@ function generatedevicelink($device, $text=0, $start=0, $end=0) $contents .= "