summaryrefslogtreecommitdiff
path: root/modules/poll/poll.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r--modules/poll/poll.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index faafd5df2..cd56777cf 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 poll content', 'edit any poll content', 'edit own poll content', 'vote on polls', 'cancel own vote', 'inspect all votes');
+ return array('create poll content', 'delete own poll content', 'delete any poll content', 'edit any poll content', 'edit own poll content', 'vote on polls', 'cancel own vote', 'inspect all votes');
}
/**
@@ -66,6 +66,8 @@ function poll_access($op, $node, $account) {
return user_access('create poll content', $account);
case 'update':
return user_access('edit any poll content', $account) || (user_access('edit own poll content', $account) && ($node->uid == $account->uid));
+ case 'delete':
+ return user_access('delete any poll content', $account) || (user_access('delete own poll content', $account) && ($node->uid == $account->uid));
}
}