summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2016-02-20 02:10:30 -0800
committerNOYB <Al_Stu@Frontier.com>2016-02-20 02:10:30 -0800
commit38386fb47410c7de9da277b1bc5cdb9a042e5811 (patch)
treec5f1eb52dde4bc6e20751e7958057003512142b7
parent830ea39af85f19a96aec69521c0c1bf5b4f59882 (diff)
downloadpfsense-38386fb47410c7de9da277b1bc5cdb9a042e5811.zip
pfsense-38386fb47410c7de9da277b1bc5cdb9a042e5811.tar.gz
Title Bar Shortcuts Privileges
Only display title bar shortcuts the user has privileges for. Confusing and inconvenient being sent to the home page when clicking on those. Then have to browse back to where you were.
-rw-r--r--src/usr/local/www/head.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index 8318986..04fa583 100644
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -505,7 +505,7 @@ if (($pagename === "index.php") && ($numColumns > 2)) {
<?php endif ?>
<?php
-if (!$hide_service_status && !empty($shortcuts[$shortcut_section]['service'])) {
+if (!$hide_service_status && !empty($shortcuts[$shortcut_section]['service']) && isAllowedPage('status_services.php')) {
$ssvc = array();
switch ($shortcut_section) {
case "openvpn":
@@ -523,15 +523,15 @@ if (!$hide_service_status && !empty($shortcuts[$shortcut_section]['service'])) {
}
}
-if ('' != ($link = get_shortcut_main_link($shortcut_section, false))) {
+if (('' != ($link = get_shortcut_main_link($shortcut_section, false))) && (isAllowedPage($shortcuts[$shortcut_section]['main']))) {
echo '<li>' . $link . '</li>';
}
-if ('' != ($link = get_shortcut_status_link($shortcut_section, false))) {
+if (('' != ($link = get_shortcut_status_link($shortcut_section, false))) && (isAllowedPage($shortcuts[$shortcut_section]['status']))) {
echo '<li>' . $link . '</li>';
}
-if ('' != ($link = get_shortcut_log_link($shortcut_section, false))) {
+if (('' != ($link = get_shortcut_log_link($shortcut_section, false))) && (isAllowedPage($shortcuts[$shortcut_section]['log']))) {
echo '<li>' . $link . '</li>';
}
OpenPOWER on IntegriCloud