You are here

function tft_taxonomy_access_tft_term_access in Taxonomy File Tree 7.2

Implements hook_tft_term_access().

File

modules/tft_taxonomy_access/tft_taxonomy_access.module, line 76
Taxonomy Access integration.

Code

function tft_taxonomy_access_tft_term_access($tid, $account = NULL, $op = 'view') {
  if (!isset($account)) {
    global $user;
    $account = $user;
  }
  if ($op == 'edit' || $op == 'add-file') {
    $op = 'update';
  }
  foreach ($account->roles as $rid => $role) {
    $result = tft_taxonomy_access_load_term_grant($op, $tid, $rid);
    if (isset($result)) {
      return $result;
    }
  }
}