function ack_menu_link_access in Access Control Kit 7
Access callback for editing or deleting a menu link.
Parameters
array $menu_link: The menu link.
object $account: (optional) A user account. Defaults to the currently logged-in user.
Return value
bool TRUE if the user account has access to edit or delete the link.
4 calls to ack_menu_link_access()
- ack_menu_form_node_form_alter in ack_menu/
ack_menu.module - Implements hook_form_BASE_FORM_ID_alter().
- ack_menu_overview_form in ack_menu/
ack_menu.pages.inc - Form for editing the menu tree for a realm.
- _ack_menu_form_alter in ack_menu/
ack_menu.module - Helper function for altering the menu item and node forms.
- _ack_menu_tree_data in ack_menu/
ack_menu.pages.inc - Helper function for ack_menu_tree_data() to build a realm menu tree.
1 string reference to 'ack_menu_link_access'
- ack_menu_menu_alter in ack_menu/
ack_menu.module - Implements hook_menu_alter().
File
- ack_menu/
ack_menu.module, line 271 - The ACK menu module.
Code
function ack_menu_link_access($menu_link, $account = NULL) {
// Check for overall access to the link's menu.
$menu = menu_load($menu_link['menu_name']);
if (ack_menu_menu_access($menu, $account)) {
return TRUE;
}
// Check access grants.
return access_user_object_access('ack manage menu links', 'menu_link', $menu_link, $account);
}