You are here

function _book_access_outline_access in Book access 7.2

Determines if the outline tab is accessible.

See also

book_access_menu_alter()

1 call to _book_access_outline_access()
_book_access_outline_remove_access in ./book_access.module
Determines if the user can remove nodes from the outline.
1 string reference to '_book_access_outline_access'
book_access_menu_alter in ./book_access.module
Implements hook_menu_alter().

File

./book_access.module, line 1177
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_outline_access($node) {
  if (empty($node->book['bid'])) {
    return FALSE;
  }
  $view_access = node_access('view', $node);
  if (user_access('administer book outlines') && $view_access) {
    return TRUE;
  }
  return BookAccess::checkGrant($node->book['bid'], 'edit_outline') && $view_access;
}