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
@@ -11,7 +11,9 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
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 services');
|
||||
} else {
|
||||
if (!is_numeric($vars['service_id'])) {
|
||||
|
Reference in New Issue
Block a user