summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/head.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-02-19 09:35:47 -0500
committerjim-p <jimp@pfsense.org>2016-02-19 09:35:47 -0500
commit8559c9d9cddaab8da792af71eeb69d4230bd6508 (patch)
tree29e40f1d1df97c093818094e61351c5fc3c05dab /src/usr/local/www/head.inc
parent3c3ede28617dd6e3a4b61e32a337d227d9d8b00e (diff)
downloadpfsense-8559c9d9cddaab8da792af71eeb69d4230bd6508.zip
pfsense-8559c9d9cddaab8da792af71eeb69d4230bd6508.tar.gz
Fix Dashboard privilege edge case and show full Help menu to users with the Help privilege. Fixes #5909
Diffstat (limited to 'src/usr/local/www/head.inc')
-rw-r--r--src/usr/local/www/head.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index e2b87da..7684285 100644
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -179,9 +179,10 @@ function return_ext_menu($section) {
return $extarray;
}
-function output_menu($arrayitem, $target = null) {
+function output_menu($arrayitem, $target = null, $section = "") {
foreach ($arrayitem as $item) {
- if (isAllowedPage($item[1]) || $item[1] == "/index.php?logout") {
+ /* If the user has access to help pages, also show the full help menu. See #5909 */
+ if (isAllowedPage($item[1]) || $item[1] == "/index.php?logout" || (($section = "Help") && isAllowedPage("help.php"))) {
$attr = sprintf("href=\"%s\"", htmlentities($item[1]));
if ($target) {
$attr .= sprintf(" target=\"%s\"", htmlentities($target));
@@ -431,7 +432,7 @@ if (($pagename === "index.php") && ($numColumns > 2)) {
<?=gettext($item['name'])?>
<span class="caret"></span>
</a>
- <ul class="dropdown-menu" role="menu"><?=output_menu($item['menu'], $item['href'])?></ul>
+ <ul class="dropdown-menu" role="menu"><?=output_menu($item['menu'], $item['href'], $item['name'])?></ul>
</li>
<?php endforeach?>
</ul>
OpenPOWER on IntegriCloud