You are here

function book_access_nodeapi in Book access 6.2

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

Implements hook_nodeapi().

File

./book_access.module, line 841
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_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {
    case 'delete':
      BookAccess::deleteGrants($node->nid);
      break;
    case 'update':
      BookAccess::updateGrants($node->nid, 'uid', $node->uid, array(
        'author',
      ));
      break;
  }
}