function edit_limit_menu_alter in Edit Limit 6
Same name and namespace in other branches
- 7 edit_limit.module \edit_limit_menu_alter()
Implement hook_menu_alter().
This allows additional checks to be made for granting access checks. For instance, the node menu items use node_access() to grant permissions to edit nodes, but we want to not only check that, but also check to see if the user is allowed to continue making edits.
File
- ./
edit_limit.module, line 42 - edit_limit.module Primary module file for Edit Limit. This contains all the hooks needed to run the module.
Code
function edit_limit_menu_alter(&$items) {
// node_access() overrides
$items['node/%node/edit']['access callback'] = 'edit_limit_node_access';
// Override comment edit access checks
$items['comment/edit']['access callback'] = 'edit_limit_comment_access';
}