You are here

function registration_permission in Entity Registration 7

Same name and namespace in other branches
  1. 8.2 registration.module \registration_permission()
  2. 8 registration.module \registration_permission()
  3. 7.2 registration.module \registration_permission()

Implements hook_permission().

File

./registration.module, line 383

Code

function registration_permission() {
  $permissions = array(
    'administer registration types' => array(
      'title' => t('Administer registration types'),
      'description' => t('Manage registration types, fields, and display settings.'),
      'restrict access' => TRUE,
    ),
    'administer registration states' => array(
      'title' => t('Administer registration states'),
      'description' => t('Manage registration states, fields, and display settings.'),
      'restrict access' => TRUE,
    ),
    'administer registration' => array(
      'title' => t('Administer registration'),
      'description' => t('View, edit, delete, and manage all registrations, regardless of type.'),
      'restrict access' => TRUE,
    ),
  );
  foreach (registration_get_types() as $type_info) {
    $permissions += registration_permission_list($type_info);
  }
  return $permissions;
}