summaryrefslogtreecommitdiff
path: root/modules/poll/poll.module
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2008-01-09 09:51:35 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2008-01-09 09:51:35 +0000
commit33f455d2df47ef80dd5b3c736762cecd23b0ba63 (patch)
treebb98ef555f3b1844b2043668c8539cfe99b71a8c /modules/poll/poll.module
parent7de29914a9cbb6d82e4d5798f46565322e41b021 (diff)
downloadbrdo-33f455d2df47ef80dd5b3c736762cecd23b0ba63.tar.gz
brdo-33f455d2df47ef80dd5b3c736762cecd23b0ba63.tar.bz2
#153998 by David_Rothstein and myself: clean up permissions in book, blog, blogapi, forum and locale modules
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));
}
}