You are here

function vote_storylink_access in Vote Up/Down 5

Implementation of hook_access().

File

./vote_storylink.module, line 44

Code

function vote_storylink_access($op, $node) {
  global $user;
  switch ($op) {
    case 'view':
      return $node->status && user_access('view storylinks');
    case 'create':
      return user_access('create storylinks');
    case 'update':
    case 'delete':
      return user_access('edit own storylinks') && $user->uid == $node->uid;
  }
}