You are here

function forena_permission in Forena Reports 7.5

Same name and namespace in other branches
  1. 8 forena.module \forena_permission()
  2. 7 forena.module \forena_permission()
  3. 7.2 forena.module \forena_permission()
  4. 7.3 forena.module \forena_permission()
  5. 7.4 forena.module \forena_permission()

Implementation of hook_perm

Return value

unknown

File

./forena.module, line 938

Code

function forena_permission() {
  $perms = array(
    'administer forena reports' => array(
      'title' => t('Administer Forena Reports'),
    ),
    'list reports' => array(
      'title' => t('List reports'),
    ),
    'create any report' => array(
      'title' => t('Create a report'),
    ),
    'design any report' => array(
      'title' => t('Design reports'),
    ),
    'delete report' => array(
      'title' => t('Delete reports'),
    ),
    'perform email merge' => array(
      'title' => t('Peform email merge'),
    ),
    'access forena block xml' => array(
      'title' => t('Access data from data blocks directly'),
      'description' => t('Useful for ajax calls to data blocks'),
    ),
  );
  foreach (Frx::DataManager()->repositories as $repos => $conf) {
    $name = !empty($conf['title']) ? $conf['title'] : $repos;
    $perms['access ' . $repos . ' data'] = array(
      'title' => 'Access ' . $name . ' Data',
    );
  }
  return $perms;
}