fix users being able to view ports they are allowed to view, when not allowed to view the device

git-svn-id: http://www.observium.org/svn/observer/trunk@2145 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-23 10:47:40 +00:00
parent bf694bdb09
commit 1fcb7b6cb8

View File

@ -2,7 +2,7 @@
if ($_GET['id']) { $_GET['id'] = mres($_GET['id']); }
if ($_GET['section'] == "interface" && is_numeric($_GET['opta']) && port_permitted($_GET['opta']))
if ($_GET['section'] == "port" && is_numeric($_GET['opta']) && port_permitted($_GET['opta']))
{
$check_device = get_device_id_by_interface_id($_GET['opta']);
$permit_ports = 1;
@ -264,18 +264,18 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
</a>
</li>');
}
echo("</ul>");
}
if(device_permitted($device['device_id']) || $check_device == $_GET['id']) {
echo('<div class="contentstyle">');
include("pages/device/".mres(basename($section)).".inc.php");
echo("</div>");
} else {
include("includes/error-no-perm.inc.php");
}
}
else
{
include("includes/error-no-perm.inc.php");
}
?>