function _advpoll_electoral_list_access in Advanced Poll 7
Same name and namespace in other branches
- 6.3 advpoll.module \_advpoll_electoral_list_access()
- 6 advpoll.module \_advpoll_electoral_list_access()
- 6.2 advpoll.module \_advpoll_electoral_list_access()
- 7.3 advpoll.module \_advpoll_electoral_list_access()
- 7.2 advpoll.module \_advpoll_electoral_list_access()
Electorial list access callback.
Determines display of Electoral list tab. Users that have permission to see Electoral lists do not have permission to edit them. A user must have administer polls permission to be able to add or remove users from electoral list.
Parameters
$node: An advanced poll node.
Return value
Returns true or false
1 string reference to '_advpoll_electoral_list_access'
- advpoll_menu in ./
advpoll.module - Implements hook_menu()
File
- ./
advpoll.module, line 914
Code
function _advpoll_electoral_list_access($node) {
if ($node->type == 'advpoll') {
$data = advpoll_get_data($node);
return (user_access('access electoral list') || user_access('administer polls')) && $data->electoral;
}
}