Provides support for Node Collection if you are using Menu Admin Per Menu to circumvent Drupal core's all-or-nothing menu permission system.
The patch essentially takes out the access callback using that uses "administer menu" and replaces it with a more granular access callback that provides support for menu_admin_per_menu.
You can then give editors access to certain menu's on the site only, including the menu's created by this module. To complete the flow, you need to manually assign editors (or whatever other role) access to that menu when it is created by Node Collection. You can use hook_menu to do that, with something like
/**
* Implements hook_menu_insert().
*
* Add editor permissions for menu's added by node_collection; needed since we manage
* granular menu permissions using menu_admin_per_menu and editors otherwise wouldn't have
* access automatically to node_collection created menu's.
*/
function oc_events_menu_insert($menu) {
if (substr($menu['menu_name'], 0, 3) == 'nc-') {
$editor_role = user_role_load_by_name('editor');
user_role_grant_permissions($editor_role->rid, array('administer '. $menu['menu_name'] .' menu items'));
}
}
Comments
Comment #1
pvhee commentedPatch attached