diff options
author | NOYB <Al_Stu@Frontier.com> | 2016-02-19 21:14:30 -0800 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-02-20 07:30:56 -0500 |
commit | 820780b506ea9dc81d33b4637ee4406dafc8df89 (patch) | |
tree | da5ff4268397c8d2ad9fdbd23c5e834fa6bdb24f /src | |
parent | f700dc99fd31162ee375fd08bcefbfbcb34f81b9 (diff) | |
download | pfsense-820780b506ea9dc81d33b4637ee4406dafc8df89.zip pfsense-820780b506ea9dc81d33b4637ee4406dafc8df89.tar.gz |
Status / System Logs - Manage Logs Panel Access
If the user does not have access to status logs settings page, then exclude the manage log panel from the page.
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/head.inc | 9 | ||||
-rw-r--r-- | src/usr/local/www/status_logs_common.inc | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc index 8318986..7a471e0 100644 --- a/src/usr/local/www/head.inc +++ b/src/usr/local/www/head.inc @@ -496,13 +496,18 @@ if (($pagename === "index.php") && ($numColumns > 2)) { </li> <?php endif ?> - <?php if ($system_logs_manage_log_form_hidden): ?> + <?php if ($system_logs_manage_log_form_hidden): + /* If the user does not have access to status logs settings page, then exclude the manage log panel icon from the title bar. */ + if (isAllowedPage("status_logs_settings.php")) { + ?> <li> <a onclick="$('#manage-log-form').toggle(360)" title="<?=gettext("Manage log")?>"> <i class="fa fa-wrench icon-pointer"></i> </a> </li> - <?php endif ?> + <?php } + endif + ?> <?php if (!$hide_service_status && !empty($shortcuts[$shortcut_section]['service'])) { diff --git a/src/usr/local/www/status_logs_common.inc b/src/usr/local/www/status_logs_common.inc index 3cc9157..58071f0 100644 --- a/src/usr/local/www/status_logs_common.inc +++ b/src/usr/local/www/status_logs_common.inc @@ -777,6 +777,11 @@ function manage_log_code() { # Manage Log Section/Form function manage_log_section() { + /* If the user does not have access to status logs settings page, then exclude the manage log panel from the page. */ + if (!isAllowedPage("status_logs_settings.php")) { + return; + } + global $input_errors, $allowed_logs, $logfile, $config, $pconfig; global $system_logs_manage_log_form_hidden; |