mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Don't access $_SESSION directly for Auth (#8513)
* Don't access $_SESSION directly for Auth * fix style * add property annotations
This commit is contained in:
committed by
Neil Lathwood
parent
2ece84495d
commit
7250376104
@ -5,6 +5,7 @@ $(function () {
|
||||
</script>
|
||||
<?php
|
||||
|
||||
use LibreNMS\Authentication\Auth;
|
||||
use LibreNMS\Util\IP;
|
||||
|
||||
// This file prints a table row for each interface
|
||||
@ -42,7 +43,7 @@ if (dbFetchCell('SELECT COUNT(*) FROM `mac_accounting` WHERE `port_id` = ?', arr
|
||||
echo "<tr style=\"background-color: $row_colour;\" valign=top onmouseover=\"this.style.backgroundColor='{$config['list_colour']['highlight']}';\" onmouseout=\"this.style.backgroundColor='$row_colour';\" style='cursor: pointer;'>
|
||||
<td valign=top width=350>";
|
||||
|
||||
if (is_admin() || is_read()) {
|
||||
if (Auth::user()->hasGlobalRead()) {
|
||||
$port_data = array_to_htmljson($port);
|
||||
echo '<i class="fa fa-tag" data-toggle="popover" data-content="'.$port_data.'" data-html="true"></i>';
|
||||
}
|
||||
|
Reference in New Issue
Block a user