diff options
author | pengbo | 2017-11-12 12:18:15 +0000 |
---|---|---|
committer | pengbo | 2017-11-12 12:18:15 +0000 |
commit | e778655169388c457da4fe46baa25babdbc3e92f (patch) | |
tree | b6550df3fe03677e673fca8211d1d2cf475a6edc | |
parent | 36e90d65c218e9ee3ce9061784305c7c9d287e6c (diff) |
If $_SESSION[SESSION_IS_SUPER_USER] exists, get the is_superuser information from $_SESSION.
-rw-r--r-- | nodeStatus.php | 3 | ||||
-rw-r--r-- | 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'); @@ -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(); |