mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
reduce services/locations viewing level to 5
git-svn-id: http://www.observium.org/svn/observer/trunk@1032 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
echo('<table cellpadding="7" cellspacing="0" class="devicetable" width="100%">');
|
||||
|
||||
if($_SESSION['userlevel'] == '10') {
|
||||
if($_SESSION['userlevel'] >= '5') {
|
||||
$sql = "SELECT `location` FROM `devices` GROUP BY `location` ORDER BY `location`";
|
||||
} else {
|
||||
$sql = "SELECT `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`";
|
||||
|
||||
@@ -5,7 +5,7 @@ if($_GET['status'] == '0') { $where = " AND service_status = '0'"; } else { unse
|
||||
echo("<div style='margin: 5px;'><table cellpadding=7 border=0 cellspacing=0 width=100%>");
|
||||
//echo("<tr class=interface-desc bgcolor='#e5e5e5'><td>Device</td><td>Service</td><td>Status</td><td>Changed</td><td>Checked</td><td>Message</td></tr>");
|
||||
|
||||
if ($_SESSION['userlevel'] == '10') {
|
||||
if ($_SESSION['userlevel'] >= '5') {
|
||||
$host_sql = "SELECT * FROM devices AS D, services AS S WHERE D.device_id = S.device_id GROUP BY D.hostname ORDER BY D.hostname";
|
||||
} else {
|
||||
$host_sql = "SELECT * FROM devices AS D, services AS S, devices_perms AS P WHERE D.device_id = S.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' $where GROUP BY D.hostname ORDER BY D.hostname";
|
||||
|
||||
Reference in New Issue
Block a user