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:
Tony Murray
2018-04-07 15:55:28 -05:00
committed by Neil Lathwood
parent 2ece84495d
commit 7250376104
193 changed files with 949 additions and 510 deletions

View File

@@ -23,7 +23,9 @@
* @author Tony Murray <murraytony@gmail.com>
*/
if (is_admin() === false) {
use LibreNMS\Authentication\Auth;
if (!Auth::user()->hasGlobalAdmin()) {
$status = array('status' =>1, 'message' => 'ERROR: You need to be admin to delete poller entries');
} else {
$id = $vars['id'];