You are here

function og_ui_og_permission in Organic groups 7.2

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

Implement hook_og_permission().

File

og_ui/og_ui.module, line 1039
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['manage members'] = array(
    'title' => t('Manage members'),
    'description' => t('Users may remove group members and alter member status and roles.'),
    'default role' => array(
      OG_ADMINISTRATOR_ROLE,
    ),
    'restrict access' => TRUE,
  );
  $items['manage roles'] = array(
    'title' => t('Add roles'),
    'description' => t('Users may view group roles and add new roles if group default roles are overriden.'),
    'default role' => array(
      OG_ADMINISTRATOR_ROLE,
    ),
    'restrict access' => TRUE,
  );
  $items['manage permissions'] = array(
    'title' => t('Manage permissions'),
    'description' => t('Users may view the group permissions page and change permsissions if group default roles are overriden.'),
    'default role' => array(
      OG_ADMINISTRATOR_ROLE,
    ),
    'restrict access' => TRUE,
  );
  return $items;
}