Skip to content

Commit fca4392

Browse files
author
Till Brehm
committed
Merge branch 'patch-5' into 'stable-3.1'
Make sure admin check apply to all admins and not just user 1. Make sure admin check apply to all admins and not just user 1. See merge request !443
2 parents 504ba30 + 97182ec commit fca4392

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)