Project

General

Profile

Actions

Feature #773

closed

CODE for remove unnecesary menu items for users with restrictions.

Added by Angel Sandoval over 13 years ago. Updated over 4 years ago.

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);

Actions #1

Updated by Ermal Luçi over 13 years ago

  • Target version changed from 2.0 to Future
  • Affected Version changed from 2.0 to All
Actions #2

Updated by Jim Pingle about 12 years ago

See also #1740

Actions #3

Updated by Kill Bill about 7 years ago

Long done, can be closed.

Actions #4

Updated by Jim Pingle about 7 years ago

  • Status changed from New to Resolved
Actions #5

Updated by Jim Pingle over 4 years ago

  • Target version deleted (Future)
Actions

Also available in: Atom PDF