You are here

function library_permission in Library 7

Implements hook_permission().

File

./library.module, line 70

Code

function library_permission() {
  $permissions = array(
    'administer library' => array(
      'title' => t('Administer Library'),
      'description' => t('Modify library settings such as adding additional actions or modifying load periods'),
    ),
    'administer transactions' => array(
      'title' => t('Administer Library Transactions'),
      'description' => t('Execute any library action on behalf of this user or another user that this user has permission to access'),
    ),
    'view library history' => array(
      'title' => t('View Library History'),
      'description' => t('View history for each node or user that this user has permission to access'),
    ),
    'view own library history' => array(
      'title' => t('View Own Library History'),
      'description' => t('View own library history'),
    ),
  );
  foreach (library_actions() as $aid => $action) {
    $permissions['submit library ' . $action['name']] = array(
      'title' => t('submit library @action', array(
        '@action' => $action['name'],
      )),
    );
  }
  return $permissions;
}