From 33f455d2df47ef80dd5b3c736762cecd23b0ba63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Wed, 9 Jan 2008 09:51:35 +0000 Subject: #153998 by David_Rothstein and myself: clean up permissions in book, blog, blogapi, forum and locale modules --- modules/poll/poll.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/poll') 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)); } } -- cgit v1.2.3