diff options
Diffstat (limited to 'app/Models/Auth.php')
| -rw-r--r-- | app/Models/Auth.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Models/Auth.php b/app/Models/Auth.php index b7fb0e6d6..3eb57a877 100644 --- a/app/Models/Auth.php +++ b/app/Models/Auth.php @@ -115,14 +115,15 @@ class FreshRSS_Auth { * @return boolean true if user has corresponding access, false else. */ public static function hasAccess($scope = 'general') { - $conf = Minz_Configuration::get('system'); - $default_user = $conf->default_user; + $systemConfiguration = Minz_Configuration::get('system'); + $userConfiguration = Minz_Configuration::get('user'); + $default_user = $systemConfiguration->default_user; $ok = self::$login_ok; switch ($scope) { case 'general': break; case 'admin': - $ok &= Minz_Session::param('currentUser') === $default_user; + $ok &= $default_user === Minz_Session::param('currentUser') || $userConfiguration->is_admin; break; default: $ok = false; |
