mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove legacy auth usage of $_SESSION (#10491)
* Remove auth use of $_SESSION Will break plugins that depend on $_SESSION, Weathermap was already fixed. Port them to use Auth::check()/Auth::user()/Auth:id() * revert accidental replacement
This commit is contained in:
@@ -5,7 +5,6 @@ $(function () {
|
||||
</script>
|
||||
<?php
|
||||
|
||||
use LibreNMS\Authentication\LegacyAuth;
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\Util\IP;
|
||||
|
||||
@@ -44,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::get('list_colour.highlight') . "';\" onmouseout=\"this.style.backgroundColor='$row_colour';\" style='cursor: pointer;'>
|
||||
<td valign=top width=350>";
|
||||
|
||||
if (LegacyAuth::user()->hasGlobalRead()) {
|
||||
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