The default functionality of this module is to allow granular menu permissions on a per-role basis. It would be a pretty simple task to allow other modules to hook into this functionality to allow granular menu permissions on arbitrary criteria.

An example use-case is the Domain Access suite, which allows a single Drupal installation to span multiple domains. An extension module called Domain Menu Block creates a unique menu for each domain created. I'd like to use Menu Admin Per Menu to give users administrative access to menus that are associated with the domains that they're assigned to.

CommentFileSizeAuthor
#1 menu_admin_per_menu-drupal_alter.patch2.81 KBles lim

Comments

les lim’s picture

Status: Active » Needs review
StatusFileSize
new2.81 KB

The attached patch adds a drupal_alter() in _menu_admin_per_menu_get_perm_menus(), allowing other modules to change the available menus the user may administer. In order to make this useful, the patch also removes direct calls to user_access() for individual menus, replacing them with calls to _menu_admin_per_menu_get_perm_menus().

les lim’s picture

bforchhammer’s picture

Status: Needs review » Reviewed & tested by the community
anrikun’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Note that hook_menu_admin_per_menu_alter() was renamed to hook_menu_admin_per_menu_perm_menus_alter() for clarity.

  • anrikun committed a25c6b7 on 7.x-1.x authored by Les Lim
    Issue #1638424 by Les Lim: Allow modules to alter the list of permitted...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.