You are here

function og_og_permission in Organic groups 7.2

Same name and namespace in other branches
  1. 7 og.module \og_og_permission()

Implements hook_og_permission().

File

./og.module, line 456
Enable users to create and manage groups with roles and permissions.

Code

function og_og_permission() {

  // Generate standard node permissions for all applicable node types.
  $perms = array();
  $perms['update group'] = array(
    'title' => t('Edit group'),
    'description' => t('Edit the group. Note: This permission controls only node entity type groups.'),
    'default role' => array(
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  $perms['administer group'] = array(
    'title' => t('Administer group'),
    'description' => t('Manage group members and content in the group.'),
    'default role' => array(
      OG_ADMINISTRATOR_ROLE,
    ),
    'restrict access' => TRUE,
  );
  foreach (node_permissions_get_configured_types() as $type) {
    $perms = array_merge($perms, og_list_permissions($type));
  }
  return $perms;
}