You are here

function group_group_permission in Group 7

Implements hook_group_permission().

File

./group.group.inc, line 10
Hook implementations for the Group module.

Code

function group_group_permission() {
  $combo_warning = '<br />' . t('Enabling multiple means of joining a group may result in a weird user experience');
  $permissions = array(
    'administer group' => array(
      'title' => t('Administer group'),
      'description' => t('Administer the group, its content and members'),
      'restrict access' => TRUE,
    ),
    'administer members' => array(
      'title' => t('Administer group members'),
      'description' => t('Administer the group members'),
      'restrict access' => TRUE,
    ),
    'access member overview' => array(
      'title' => t('Access the member overview page'),
    ),
    'access member pages' => array(
      'title' => t('View the individual member pages'),
    ),
    'access member metadata' => array(
      'title' => t('View the individual member metadata: Join date, invited by, ...'),
    ),
    'edit own membership' => array(
      'title' => t('Edit own membership'),
      'description' => t('Edit own membership information'),
      'limit to' => GROUP_LIMIT_MEMBER,
    ),
    'edit group' => array(
      'title' => t('Edit group'),
      'description' => t('Edit the group information'),
    ),
    'delete group' => array(
      'title' => t('Delete group'),
      'description' => t('Delete the group'),
    ),
    'join group' => array(
      'title' => t('Join group'),
      'description' => t('Join with the click of a button') . $combo_warning,
      'limit to' => GROUP_LIMIT_OUTSIDER,
    ),
    'join group form' => array(
      'title' => t('Join group (form)'),
      'description' => t('Join by filling out the member form') . $combo_warning,
      'limit to' => GROUP_LIMIT_OUTSIDER,
    ),
    'request membership' => array(
      'title' => t('Request group membership'),
      'description' => t('Request to join the group with the click of a button') . $combo_warning,
      'limit to' => GROUP_LIMIT_OUTSIDER,
    ),
    'request membership form' => array(
      'title' => t('Request group membership (form)'),
      'description' => t('Request to join the group by filling out a member form') . $combo_warning,
      'limit to' => GROUP_LIMIT_OUTSIDER,
    ),
    'leave group' => array(
      'title' => t('Leave group'),
      'limit to' => GROUP_LIMIT_MEMBER,
    ),
    'view group' => array(
      'title' => t('View group'),
    ),
  );
  return $permissions;
}