You are here

function biblio_permission in Bibliography Module 7.3

Same name and namespace in other branches
  1. 7 biblio.module \biblio_permission()
  2. 7.2 biblio.module \biblio_permission()

Implements hook_permission().

Since we are limiting the ability to create new nodes to certain users, we need to define what those permissions are here. We also define a permission to allow users to edit the nodes they created.

File

./biblio.module, line 31
Maintains bibliographic lists.

Code

function biblio_permission() {
  return array(
    'administer biblio' => array(
      'title' => t('Administer Biblio'),
      'description' => t('Allows full control (create, update, delete) of all Biblio nodes.'),
    ),
    'access biblio content' => array(
      'title' => t('Access Biblio content'),
      'description' => t('Allows the user to view Biblio nodes.'),
    ),
    'create biblio content' => array(
      'title' => t('Create Biblio'),
      'description' => t('Allows the user to create new Biblios.'),
    ),
    'edit biblio content' => array(
      'title' => t('Edit Biblio'),
      'description' => t('Allows the user to edit any biblio.'),
    ),
    'edit own biblio content' => array(
      'title' => t('Edit own Biblio'),
      'description' => t('Allows the user to edit his own biblio.'),
    ),
    'delete biblio content' => array(
      'title' => t('Delete Biblio'),
      'description' => t('Allows the user to delete any biblio.'),
    ),
    'delete own biblio content' => array(
      'title' => t('Delete own Biblio'),
      'description' => t('Allows the user to delete his own biblio.'),
    ),
    'edit by all biblio authors' => array(
      'title' => t('Edit by all Biblio authors'),
      'description' => t('Allows any/all of the authors associated with a biblio to edit the biblio. This requires the Drupal User ID be mapped to a Biblio author ID.'),
    ),
    'edit biblio authors' => array(
      'title' => t('Edit Biblio authors'),
      'description' => t('Allows the user to edit author information.'),
    ),
    'manage biblio structure' => array(
      'title' => t('Manage Biblio structure'),
      'description' => t('This determines if the user will be able to modify field and display settings for biblio and contributor entities (admin/structure/biblio).'),
    ),
    'manage biblio content' => array(
      'title' => t('Manage Biblio content'),
      'description' => t('This determines if the user will be able to access the managment interface for biblios and contributors (admin/content/biblio).'),
    ),
    'import from file' => array(
      'title' => t('Import from file'),
      'description' => t('Allows the user to import bibliographic data from files such as BibTex, RIS, EndNote.'),
    ),
    'show export links' => array(
      'title' => t('Show export links'),
      'description' => t('Allows users to see links which allow export of bibliographic data for an individual entry or the entire result set.'),
    ),
    // Contributor permissions.
    'create biblio contributor' => array(
      'title' => t('Create Biblio contributor'),
      'description' => t('Grant to the user the permission to create a biblio contributor via the UI.'),
    ),
    'edit biblio contributor' => array(
      'title' => t('Edit Biblio contributor'),
      'description' => t('Grant to the user the permission to update a biblio contributor via the UI.'),
    ),
    'delete biblio contributor' => array(
      'title' => t('Delete Biblio contributor'),
      'description' => t('Grant to the user the permission to delete a biblio contributor via the UI.'),
    ),
    'view biblio contributor' => array(
      'title' => t('View Biblio contributor'),
      'description' => t('Grant to the user the permission to view a biblio contributor via the UI.'),
    ),
  );
}