You are here

function autotag_callback_access in Taxonomy Autotagger 6.2

Access callback

1 string reference to 'autotag_callback_access'
autotag_menu in ./autotag.module
hook_menu

File

./autotag.module, line 211

Code

function autotag_callback_access($content_type, $nid = FALSE) {

  // If we've got a nid, then check this user can edit that node, else we assume
  // that we're creating a new node, so check the user can create a node of this
  // type
  if ($nid) {
    $node = node_load(array(
      'nid' => $nid,
    ));
    return node_access('update', $node);
  }
  else {
    return node_access('create', $content_type);
  }
}