summaryrefslogtreecommitdiff
path: root/modules/node
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/node
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/node')
-rw-r--r--modules/node/node.module8
1 files changed, 4 insertions, 4 deletions
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;
}
}