Skip to content

Commit 97182ec

Browse files
committed
Make sure admin check apply to all admins and not just user 1.
1 parent 504ba30 commit 97182ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/lib/classes/system.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function has_service($userid, $service) {
3737

3838
if(!preg_match('/^[a-z]+$/', $service)) $app->error('Invalid service '.$service);
3939

40-
if($userid == 1) return true; //* We do not check admin-users
40+
if(isset($_SESSION['s']['user']) && $_SESSION['s']['user']['typ'] == 'admin') return true; //* We do not check admin-users
4141

4242
// simple query cache
4343
if($this->client_service===null)

0 commit comments

Comments
 (0)