You are here

function og_ui_og_permission in Organic groups 7

Same name and namespace in other branches
  1. 7.2 og_ui/og_ui.module \og_ui_og_permission()

Implement hook_og_permission().

File

og_ui/og_ui.module, line 469
Organic groups UI.

Code

function og_ui_og_permission() {
  $items = array();
  $items['subscribe'] = array(
    'title' => t('Subscribe to group'),
    'description' => t('Allow non-members to request membership to a group (approval required).'),
    'roles' => array(
      OG_ANONYMOUS_ROLE,
    ),
    'default role' => array(
      OG_ANONYMOUS_ROLE,
    ),
  );
  $items['subscribe without approval'] = array(
    'title' => t('Subscribe to group (no approval required)'),
    'description' => t('Allow non-members to join a group without an approval from group administrators.'),
    'roles' => array(
      OG_ANONYMOUS_ROLE,
    ),
  );
  $items['unsubscribe'] = array(
    'title' => t('Unsubscribe from group'),
    'description' => t('Allow members to unsubscribe themselves from a group, removing their membership.'),
    'roles' => array(
      OG_AUTHENTICATED_ROLE,
    ),
    'default role' => array(
      OG_AUTHENTICATED_ROLE,
    ),
  );
  $items['approve and deny subscription'] = array(
    'title' => t('Approve and deny subscription'),
    'description' => t('Users may allow or deny another user\'s subscription request.'),
    'default role' => array(
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  $items['add user'] = array(
    'title' => t('Add user'),
    'description' => t('Users may add other users to the group without approval.'),
    'default role' => array(
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  $items['access administration pages'] = array(
    'title' => t('Use the administration pages'),
    'description' => t('Allow users to see the "Group" tab, and access the administration pages.'),
    'default role' => array(
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  return $items;
}