You are here

function advpoll_permission in Advanced Poll 7.2

Same name and namespace in other branches
  1. 7.3 advpoll.module \advpoll_permission()
  2. 7 advpoll.module \advpoll_permission()

Implementation of hook_permission().

Note - rules for editting, deleting or creating polls is now handled by Node permissions since the poll content types are CCK.

File

./advpoll.module, line 128

Code

function advpoll_permission() {
  return array(
    'vote on polls' => array(
      'title' => t('Vote on polls'),
      'description' => t('User may vote on polls.'),
    ),
    'cancel own vote' => array(
      'title' => t('Cancel own vote'),
      'description' => t('User may cancel their vote in cases where individual user votes are being tracked.'),
    ),
    'administer polls' => array(
      'title' => t('Administer polls'),
      'description' => t('User may use poll administration pages.'),
      'restrict access' => TRUE,
    ),
    'inspect all votes' => array(
      'title' => t('Inspect all votes'),
      'description' => t('User may use votes administration page.'),
      'restrict access' => TRUE,
    ),
    'show vote results' => array(
      'title' => t('Show vote results'),
      'description' => t('User may view poll results in cases where access to results is generally restricted.'),
    ),
    'access electoral list' => array(
      'title' => t('Access electoral list'),
      'description' => t('User may see electoral lists associated with each poll.'),
    ),
    'add write-ins' => array(
      'title' => t('Add write-in votes'),
      'description' => t('User may add write-ins for polls that allow them.'),
      'restrict access' => TRUE,
    ),
  );
}