You are here

function advpoll_access in Advanced Poll 6.3

Same name and namespace in other branches
  1. 5 advpoll.module \advpoll_access()
  2. 6 advpoll.module \advpoll_access()
  3. 6.2 advpoll.module \advpoll_access()

Implementation of hook_access().

File

./advpoll.module, line 49
Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.

Code

function advpoll_access($op, $node, $account) {
  if ($op == 'create') {
    return user_access('create polls', $account);
  }
  if ($op == 'update') {
    if (user_access('edit polls', $account) || $node->uid == $account->uid && user_access('edit own polls', $account)) {
      return TRUE;
    }
  }
}