summaryrefslogtreecommitdiff
path: root/modules/poll
diff options
context:
space:
mode:
Diffstat (limited to 'modules/poll')
-rw-r--r--modules/poll/poll.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 63d95fbed..311d732a1 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -54,7 +54,7 @@ function poll_theme() {
* Implementation of hook_perm().
*/
function poll_perm() {
- return array('create polls', 'edit polls', 'edit own poll', 'vote on polls', 'cancel own vote', 'inspect all votes');
+ return array('create poll content', 'edit any poll content', 'edit own poll content', 'vote on polls', 'cancel own vote', 'inspect all votes');
}
/**
@@ -65,9 +65,9 @@ function poll_access($op, $node, $account) {
switch ($op) {
case 'create':
- return user_access('create polls', $account);
+ return user_access('create poll content', $account);
case 'update':
- return user_access('edit polls') || (user_access('edit own poll') && ($node->uid == $user->uid));
+ return user_access('edit any poll content') || (user_access('edit own poll content') && ($node->uid == $user->uid));
}
}
@@ -184,7 +184,7 @@ function poll_node_info() {
function poll_form(&$node, $form_state) {
global $user;
- $admin = user_access('administer nodes') || user_access('edit polls') || (user_access('edit own polls') && $user->uid == $node->nid);
+ $admin = user_access('administer nodes') || user_access('edit any poll content') || (user_access('edit own poll content') && $user->uid == $node->nid);
$type = node_get_types('type', $node);
$form = array(