From 97182ec0696a0344afba26a72cec5afc56fa5404 Mon Sep 17 00:00:00 2001 From: Martin <martin@enavn.com> Date: Mon, 12 Sep 2016 14:00:32 +0200 Subject: [PATCH] Make sure admin check apply to all admins and not just user 1. --- interface/lib/classes/system.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/system.inc.php b/interface/lib/classes/system.inc.php index e9b6639109..cef9424a75 100644 --- a/interface/lib/classes/system.inc.php +++ b/interface/lib/classes/system.inc.php @@ -37,7 +37,7 @@ class system { if(!preg_match('/^[a-z]+$/', $service)) $app->error('Invalid service '.$service); - if($userid == 1) return true; //* We do not check admin-users + if(isset($_SESSION['s']['user']) && $_SESSION['s']['user']['typ'] == 'admin') return true; //* We do not check admin-users // simple query cache if($this->client_service===null) -- GitLab