You are here

function book_access_node_grants in Book access 6

Same name and namespace in other branches
  1. 5 book_access.module \book_access_node_grants()
  2. 6.2 book_access.module \book_access_node_grants()
  3. 7.2 book_access.module \book_access_node_grants()
  4. 1.x book_access.module \book_access_node_grants()

Implements hook_node_grants().

File

./book_access.module, line 269
Allows 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_node_grants($account, $op) {
  $grants['book_access_role'] = array_keys($account->roles);
  $grants['book_access_user'] = array(
    $account->uid,
  );
  return $grants;
}