diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-09 09:51:35 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-09 09:51:35 +0000 |
commit | 33f455d2df47ef80dd5b3c736762cecd23b0ba63 (patch) | |
tree | bb98ef555f3b1844b2043668c8539cfe99b71a8c /modules/poll/poll.module | |
parent | 7de29914a9cbb6d82e4d5798f46565322e41b021 (diff) | |
download | brdo-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.module | 4 |
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)); } } |