Actions
Feature #773
closedCODE for remove unnecesary menu items for users with restrictions.
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Start date:
07/30/2010
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Release Notes:
Description
I know this is not the best (or correct) method to give feedback or code but maybe you can find this useful
I wrote a little function in the line 229 of fbegin.inc file, with de purpose of remove unnecesary menu items, when some configured users are not allowed to enter such pages on the webgui, personally I suggest it for aestethics improvement, hope this one could help to ohters.
Regards
/* REMOVE UNNECESARY MENU ITEMS CODE by Angel Sandoval (oilop9000) */
function removeNotAllowedItems (&$menuArray,$menuAllowedItems){
global $_SESSION;
if (!is_array($menuArray))
$menuArray = array();
foreach ($menuArray as $itemIndex => $item) {
$itemBaseName = basename($item[1]);
//Remove unnecesary Items from menu
if (!cmp_page_matches($itemBaseName,$_SESSION['page-match']))
unset($menuArray[$itemIndex]);
}
}
// Example of use: removeNotAllowedItems($services_menu,$menuAllowedItems);
Updated by Ermal Luçi almost 14 years ago
- Target version changed from 2.0 to Future
- Affected Version changed from 2.0 to All
Actions