You are here

function access_unpublished_permission in Access unpublished 7

Implements hook_permission().

File

./access_unpublished.module, line 31
Drupal module: Access unpublished.

Code

function access_unpublished_permission() {
  $permissions['access unpublished view unpublished node'] = array(
    'title' => t('View unpublished contents'),
    'description' => t('Allow users to view unpublished contents with unique key in URL path'),
  );
  if (module_exists('workbench_moderation')) {
    $permissions['access unpublished view workbench moderation drafts'] = array(
      'title' => t('View moderated drafts'),
      'description' => t('Allow users to view workbench moderation drafts with unique key in URL path - also requires "View unpublished contents" permission above'),
    );
  }
  $permissions['access unpublished view hashkey'] = array(
    'title' => t('View hash key link to unpublished contents'),
    'description' => t('Allow users to view link with hash key for view unpublished contents'),
  );
  $permissions['access unpublished configuration'] = array(
    'title' => t('Access unpublished module configuration'),
    'description' => t('Allow users to configure module'),
  );
  return $permissions;
}