You are here

function og_webform_og_permission in Organic Groups Webform Integration 7

Implements hook_og_permission().

File

./og_webform.module, line 11
Enables organic group administrators to modify webforms within their groups.

Code

function og_webform_og_permission() {
  $items = array();
  $items['access all webform results'] = array(
    'title' => t('Access all webform results in group'),
    'description' => t('Grants access to the "Results" tab on all webforms in this group. Generally a group admin permission.'),
    'roles' => array(
      OG_ANONYMOUS_ROLE,
      OG_AUTHENTICATED_ROLE,
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  $items['edit all webform submissions'] = array(
    'title' => t('Edit all webform submissions in group'),
    'description' => t('Allows editing of any webform submission by any user in this group. Generally a group admin permission.'),
    'roles' => array(
      OG_AUTHENTICATED_ROLE,
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  $items['delete all webform submissions'] = array(
    'title' => t('Delete all webform submissions in group'),
    'description' => t('Allows deleting of any webform submission by any user in this group. Generally a group admin permission.'),
    'roles' => array(
      OG_AUTHENTICATED_ROLE,
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  $items['access own webform submissions'] = array(
    'title' => t('Access own webform submissions'),
    'roles' => array(
      OG_ANONYMOUS_ROLE,
      OG_AUTHENTICATED_ROLE,
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  $items['edit own webform submissions'] = array(
    'title' => t('Edit own webform submissions'),
    'roles' => array(
      OG_ANONYMOUS_ROLE,
      OG_AUTHENTICATED_ROLE,
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  $items['delete own webform submissions'] = array(
    'title' => t('Delete own webform submissions'),
    'roles' => array(
      OG_ANONYMOUS_ROLE,
      OG_AUTHENTICATED_ROLE,
      OG_ADMINISTRATOR_ROLE,
    ),
  );
  return $items;
}