You are here

function book_access_node_grants in Book access 5

Same name and namespace in other branches
  1. 6.2 book_access.module \book_access_node_grants()
  2. 6 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().

This function supplies the book access grants. book_access simply uses roles as grant IDs.

File

./book_access.module, line 97
Allows access control for Drupal book nodes.

Code

function book_access_node_grants($user, $op) {
  $grants['book_access'] = array_keys($user->roles);
  return $grants;
}