From e778655169388c457da4fe46baa25babdbc3e92f Mon Sep 17 00:00:00 2001 From: pengbo Date: Sun, 12 Nov 2017 21:18:15 +0900 Subject: [PATCH] If $_SESSION[SESSION_IS_SUPER_USER] exists, get the is_superuser information from $_SESSION. --- nodeStatus.php | 3 ++- status.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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(); -- 2.39.5