summaryrefslogtreecommitdiff
path: root/modules/poll/poll.module
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-11-26 11:44:04 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-11-26 11:44:04 +0000
commita960d4d618dacb5954eebc48e41517d9eaf536af (patch)
tree364740dd59709031df097110d0f0aa193c9b8ca2 /modules/poll/poll.module
parentabd2477d7bdf01832eb199c06149c0136fff9cc3 (diff)
downloadbrdo-a960d4d618dacb5954eebc48e41517d9eaf536af.tar.gz
brdo-a960d4d618dacb5954eebc48e41517d9eaf536af.tar.bz2
#120960 by blakehall, JirkaRybka, catch: improve usability of content editing permission names
Diffstat (limited to 'modules/poll/poll.module')
-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(