You are here

function content_access_node_grants in Content Access 7

Same name and namespace in other branches
  1. 8 content_access.module \content_access_node_grants()
  2. 5 content_access.module \content_access_node_grants()
  3. 6 content_access.module \content_access_node_grants()

Implements hook_node_grants().

File

./content_access.module, line 111
Content access module file.

Code

function content_access_node_grants($account, $op) {
  return array(
    'content_access_author_unpublished' => $account->uid && user_access('view own unpublished content', $account) ? array(
      $account->uid,
    ) : array(),
    'content_access_author' => array(
      $account->uid,
    ),
    'content_access_rid' => array_keys($account->roles),
  );
}