From a960d4d618dacb5954eebc48e41517d9eaf536af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Mon, 26 Nov 2007 11:44:04 +0000 Subject: #120960 by blakehall, JirkaRybka, catch: improve usability of content editing permission names --- modules/node/node.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 909d26773..7896a5812 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1048,9 +1048,9 @@ function node_perm() { $name = check_plain($type->type); $perms[] = 'create '. $name .' content'; $perms[] = 'delete own '. $name .' content'; - $perms[] = 'delete '. $name .' content'; + $perms[] = 'delete any '. $name .' content'; $perms[] = 'edit own '. $name .' content'; - $perms[] = 'edit '. $name .' content'; + $perms[] = 'edit any '. $name .' content'; } } @@ -2223,13 +2223,13 @@ function node_content_access($op, $node, $account) { } if ($op == 'update') { - if (user_access('edit '. $type .' content', $account) || (user_access('edit own '. $type .' content', $account) && ($user->uid == $node->uid))) { + if (user_access('edit any '. $type .' content', $account) || (user_access('edit own '. $type .' content', $account) && ($user->uid == $node->uid))) { return TRUE; } } if ($op == 'delete') { - if (user_access('delete '. $type .' content') || (user_access('delete own '. $type .' content') && ($user->uid == $node->uid))) { + if (user_access('delete any '. $type .' content') || (user_access('delete own '. $type .' content') && ($user->uid == $node->uid))) { return TRUE; } } -- cgit v1.2.3