You are here

function book_access_outline_access in Book access 6.2

Same name and namespace in other branches
  1. 6 book_access.module \book_access_outline_access()

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 878
Allows to set the access control for book nodes on a per book basis. It is 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;
}