mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
- User with restricted privileges will see only Locations where they have any access on. Other locations will be filtered from the lists.
git-svn-id: http://www.observium.org/svn/observer/trunk@1916 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -104,7 +104,11 @@ if ($_SESSION['userlevel'] >= '10') {
|
||||
## Display Locations entry if $config['show_locations']
|
||||
if ($config['show_locations'])
|
||||
{
|
||||
$locations = mysql_query("SELECT DISTINCT location FROM devices ORDER BY location");
|
||||
if($_SESSION['userlevel'] >= '5') {
|
||||
$locations = mysql_query("SELECT DISTINCT location FROM devices GROUP BY location ORDER BY location");
|
||||
} else {
|
||||
$locations = mysql_query("SELECT DISTINCT location FROM devices AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' GROUP BY location ORDER BY location");
|
||||
}
|
||||
?>
|
||||
<li><a class="menu2four" href="locations/"><img src="images/16/building.png" border="0" align="absmiddle" /> Locations</a>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user