You are here

function biblio_access in Bibliography Module 7

Same name and namespace in other branches
  1. 5 biblio.module \biblio_access()
  2. 6.2 biblio.module \biblio_access()
  3. 6 biblio.module \biblio_access()
  4. 7.3 biblio.module \biblio_access()
  5. 7.2 biblio.module \biblio_access()
17 calls to biblio_access()
biblio_bibtex_biblio_export_link in modules/bibtexParse/biblio_bibtex.module
Creates a link to export a node (or view) in BibTeX format.
biblio_build_query in includes/biblio.pages.inc
Biblio_db_search builds the SQL query which will be used to select and order "biblio" type nodes. The query results are then passed to biblio_show_results for output.
biblio_entry in includes/biblio.pages.inc
biblio_handler_citation::render in views/biblio_handler_citation.inc
Render the field.
biblio_import_form in includes/biblio.import.export.inc
Return a form used to import files into biblio.

... See full list

1 string reference to 'biblio_access'
biblio_menu in ./biblio.module
Implements hook_menu().

File

./biblio.module, line 481
Bibliography Module for Drupal.

Code

function biblio_access($op, $node = '') {
  global $user;
  switch ($op) {
    case 'admin':
      return user_access('administer biblio');
    case 'import':
      return user_access('import from file');
    case 'export':
      return user_access('show export links');
    case 'edit_author':
      if (user_access('administer biblio') || user_access('edit biblio authors')) {
        return NODE_ACCESS_ALLOW;
      }
      break;
    case 'download':
      if (user_access('show download links') || user_access('show own download links') && $user->uid == $node->uid) {
        return NODE_ACCESS_ALLOW;
      }
      break;
    case 'rss':
      return variable_get('biblio_rss', 0);
    default:
  }
  return NODE_ACCESS_IGNORE;
}