diff options
author | Renato Botelho <renato@netgate.com> | 2017-02-13 13:58:38 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-13 13:58:38 -0200 |
commit | 80c01e06f8aa24d68cb04d407923515d242a1a7d (patch) | |
tree | 2b0b20040d9ce8eb0cad190a45c99f69481adbed /src/usr | |
parent | 926a7f5c0ffc0d0c3e44db5f4580c19e38e87c08 (diff) | |
download | pfsense-80c01e06f8aa24d68cb04d407923515d242a1a7d.zip pfsense-80c01e06f8aa24d68cb04d407923515d242a1a7d.tar.gz |
Revert "Add privs to control display of notices"
Fix #7051
This reverts commit 04665e78537906f7375668ca665cba17f95a4864.
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/head.inc | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc index 456eaac..99561be 100644 --- a/src/usr/local/www/head.inc +++ b/src/usr/local/www/head.inc @@ -437,20 +437,6 @@ $numColumns = $user_settings['webgui']['dashboardcolumns']; if (($pagename === "index.php") && ($numColumns > 2)) { $columnsContainer = 'style="max-width: ' . 585*$numColumns . 'px;width: 100%"'; } - -$display_notices = false; -$allow_clear_notices = false; - -if (are_notices_pending()) { - // Evaluate user privs to determine if notices should be displayed, and if the user can clear them. - $user_entry = getUserEntry($_SESSION['Username']); - if (userHasPrivilege($user_entry, "user-view-clear-notices") || userHasPrivilege($user_entry, "page-all")) { - $display_notices = true; - $allow_clear_notices = true; - } elseif (userHasPrivilege($user_entry, "user-view-notices")) { - $display_notices = true; - } -} ?> <body id="<?=$numColumns?>"> <nav id="topmenu" class="navbar navbar-<?=$menuclass?>-top navbar-inverse"> @@ -500,7 +486,7 @@ if (are_notices_pending()) { <?php endforeach?> </ul> <ul class="nav navbar-nav navbar-right"> - <?php if ($display_notices):?> + <?php if (are_notices_pending()):?> <?php $notices = get_notices()?> <li class="dropdown"> <a href="#" data-toggle="modal" data-target="#notices" role="button" aria-expanded="false"> @@ -661,8 +647,7 @@ if ($config['remote_managed_pages']['item']) { // Modal notices window // The notices modal needs to be outside of the page display div or things get messy -if ($display_notices): -?> +if (are_notices_pending()):?> <div id="notices" class="modal fade" role="dialog"> <div class="modal-dialog"> @@ -712,7 +697,7 @@ if ($display_notices): <div class="modal-footer"> <button type="button" class="btn btn-info" data-dismiss="modal"><i class="fa fa-times icon-embed-btn"></i><?=gettext("Close")?></button> -<?php if ($allow_clear_notices && isAllowedPage("/index.php")):?> +<?php if (isAllowedPage("/index.php")):?> <button type="button" id="clearallnotices" class="btn btn-primary"><i class="fa fa-trash-o icon-embed-btn"></i><?=gettext("Mark All as Read")?></button> <?php endif;?> </div> @@ -740,8 +725,7 @@ if ($display_notices): //]]> </script> -<?php -endif; // ($display_notices) +<?php endif; // Get the flash Messages get_flash_message(); |