diff --git a/html/includes/graphs/application/auth.inc.php b/html/includes/graphs/application/auth.inc.php index 80256e0a58..b3e9aba257 100644 --- a/html/includes/graphs/application/auth.inc.php +++ b/html/includes/graphs/application/auth.inc.php @@ -1,6 +1,6 @@ = "5") +if ($_SESSION['userlevel'] >= "5" || $config['allow_unauth_graphs'];) { $id = mres($_GET['id']); $title = generate_device_link($device); diff --git a/html/includes/graphs/device/auth.inc.php b/html/includes/graphs/device/auth.inc.php index acd186fefe..da51ebae72 100644 --- a/html/includes/graphs/device/auth.inc.php +++ b/html/includes/graphs/device/auth.inc.php @@ -1,6 +1,6 @@ [A-Za-z0-9]+)_(?P.+)/', mres($_GET['type']), $graphtype); $type = $graphtype['type']; @@ -55,19 +46,6 @@ if(isset($_GET['debug'])) { $graphfile = $config['temp_dir'] . "/" . strgen() . ".png"; -# $os = gethostosbyid($device_id); -# if($config['os'][$os]['group']) {$os_group = $config['os'][$os]['group'];} -# if(is_file($config['install_dir'] . "/html/includes/graphs/".$type."_".$os.".inc.php")) { -# /// Type + OS Specific -# include($config['install_dir'] . "/html/includes/graphs/".$type."_".$os.".inc.php"); -# }elseif($os_group && is_file($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_group.".inc.php")) { -# /// Type + OS Group Specific -# include($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_group.".inc.php"); -# } elseif(is_file($config['install_dir'] . "/html/includes/graphs/$type.inc.php")) { -# /// Type Specific -# include($config['install_dir'] . "/html/includes/graphs/$type.inc.php"); -# } - if(is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php")) { include($config['install_dir'] . "/html/includes/graphs/$type/auth.inc.php"); if($auth) { diff --git a/html/includes/graphs/mempool/auth.inc.php b/html/includes/graphs/mempool/auth.inc.php index b549cef04e..1d9bbca4fe 100755 --- a/html/includes/graphs/mempool/auth.inc.php +++ b/html/includes/graphs/mempool/auth.inc.php @@ -5,7 +5,7 @@ if(is_numeric($id)) $sql = mysql_query("SELECT * FROM `mempools` AS C, `devices` AS D where C.`mempool_id` = '".mres($id)."' AND C.device_id = D.device_id"); $mempool = mysql_fetch_assoc($sql); - if(is_numeric($mempool['device_id']) && device_permitted($mempool['device_id'])) + if(is_numeric($mempool['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($mempool['device_id']))) { $device = device_by_id_cache($mempool['device_id']); $rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("mempool-".$mempool['mempool_type']."-".$mempool['mempool_index'].".rrd"); diff --git a/html/includes/graphs/multiport/auth.inc.php b/html/includes/graphs/multiport/auth.inc.php index a789881f72..3291c2760f 100644 --- a/html/includes/graphs/multiport/auth.inc.php +++ b/html/includes/graphs/multiport/auth.inc.php @@ -3,7 +3,7 @@ $auth = TRUE; foreach(explode(",", $id) as $ifid) { - if(!port_permitted($ifid)) + if(!$config['allow_unauth_graphs'] && !port_permitted($ifid)) $auth = FALSE; } diff --git a/html/includes/graphs/port/auth.inc.php b/html/includes/graphs/port/auth.inc.php index 336faf3181..ce0322ddf5 100644 --- a/html/includes/graphs/port/auth.inc.php +++ b/html/includes/graphs/port/auth.inc.php @@ -1,6 +1,6 @@