You are here

function book_access_menu_alter in Book access 7.2

Same name and namespace in other branches
  1. 6.2 book_access.module \book_access_menu_alter()
  2. 6 book_access.module \book_access_menu_alter()
  3. 1.x book_access.module \book_access_menu_alter()

Implements hook_menu_alter().

See also

_book_access_outline_access()

book_access_outline_remove_access()

File

./book_access.module, line 963
Allows to set the access control for book nodes on a per book basis. Based on forum_access.module and tac_lite.module.

Code

function book_access_menu_alter(&$items) {
  if (isset($items['node/%node/outline'])) {
    $items['node/%node/outline']['access callback'] = '_book_access_outline_access';
  }
  if (isset($items['node/%node/outline/remove'])) {
    $items['node/%node/outline/remove']['access callback'] = '_book_access_outline_remove_access';
  }
}