function advpoll_access in Advanced Poll 5
Same name and namespace in other branches
- 6.3 advpoll.module \advpoll_access()
- 6 advpoll.module \advpoll_access()
- 6.2 advpoll.module \advpoll_access()
Implementation of hook_access().
File
- ./
advpoll.module, line 41 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function advpoll_access($op, $node) {
global $user;
if ($op == 'create') {
return user_access('create polls');
}
if ($op == 'update') {
if (user_access('edit polls') || $node->uid == $user->uid && user_access('edit own polls')) {
return TRUE;
}
}
}