You are here

function taxonomy_access_node_grants in Taxonomy Access Control 5.2

Same name and namespace in other branches
  1. 5 taxonomy_access.module \taxonomy_access_node_grants()
  2. 6 taxonomy_access.module \taxonomy_access_node_grants()
  3. 7 taxonomy_access.module \taxonomy_access_node_grants()

Implementation of hook_node_grants() Gives access to taxonomies based on the taxonomy_access table

File

./taxonomy_access.module, line 118
Allows administrators to specify how each category (in the taxonomy) can be used by various roles.

Code

function taxonomy_access_node_grants($user, $op) {
  return array(
    'term_access' => array_keys(is_array($user->roles) ? $user->roles : array(
      1 => 'anonymous user',
    )),
  );
}