From: pengbo Date: Sun, 12 Nov 2017 12:18:15 +0000 (+0900) Subject: If $_SESSION[SESSION_IS_SUPER_USER] exists, get the is_superuser information from... X-Git-Tag: V3_7_RC1~1 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=e778655169388c457da4fe46baa25babdbc3e92f;p=pgpooladmin.git If $_SESSION[SESSION_IS_SUPER_USER] exists, get the is_superuser information from $_SESSION. --- diff --git a/nodeStatus.php b/nodeStatus.php index 3a3e7fd..0ce77e5 100644 --- a/nodeStatus.php +++ b/nodeStatus.php @@ -127,7 +127,8 @@ $tpl->assign('msgStopPgpool', $message['msgStopPgpool']); $tpl->assign('nodeCount', $nodeCount); $tpl->assign('has_not_loaded_node', $has_not_loaded_node); $tpl->assign('pgpoolIsRunning', $is_pgpool_running); -$tpl->assign('is_superuser', isSuperUser($_SESSION[SESSION_LOGIN_USER])); +$tpl->assign('is_superuser', (isset($_SESSION[SESSION_IS_SUPER_USER])) ? + $_SESSION[SESSION_IS_SUPER_USER] : isSuperUser($_SESSION[SESSION_LOGIN_USER])); // Set params $configValue = readConfigParams('recovery_1st_stage'); diff --git a/status.php b/status.php index 33ccf79..2d8fb38 100644 --- a/status.php +++ b/status.php @@ -59,7 +59,8 @@ $tpl->assign('useSyslog', useSyslog()); $tpl->assign('pipe', (isPipe(_PGPOOL2_LOG_FILE)) ? 1 : 0); $tpl->assign('msgStopPgpool', $message['msgStopPgpool']); $tpl->assign('login_user', $_SESSION[SESSION_LOGIN_USER]); -$tpl->assign('is_superuser', isSuperUser($_SESSION[SESSION_LOGIN_USER])); +$tpl->assign('is_superuser', (isset($_SESSION[SESSION_IS_SUPER_USER])) ? + $_SESSION[SESSION_IS_SUPER_USER] : isSuperUser($_SESSION[SESSION_LOGIN_USER])); // Set params $configValue = readConfigParams();