You are here

function library_action_access in Library 6.2

Same name and namespace in other branches
  1. 5.2 library.module \library_action_access()
  2. 6 library.module \library_action_access()
1 string reference to 'library_action_access'
library_menu in ./library.module
Implementation of hook_menu().

File

./library.module, line 89

Code

function library_action_access($aid) {
  global $user;
  if (user_access('administer transactions', $user)) {
    return TRUE;
  }
  elseif ($aid) {
    $action = library_get_action($aid);
    if ($action->name) {
      return user_access('submit library ' . $action->name, $user);
    }
  }
  return FALSE;
}