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:
Tony Murray
2019-08-05 14:16:05 -05:00
committed by GitHub
parent f2163edcd8
commit e99f421511
185 changed files with 342 additions and 781 deletions

View File

@@ -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>';
}