diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-11 18:29:20 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-11 18:29:20 +0000 |
commit | 89b0570d707e7a895a832f877dcdc74b68d26d42 (patch) | |
tree | 3e75c6d51a2a4798e7bd03774d7df1feb90a7af0 /modules/node/node.module | |
parent | 5dde02bb0c2cfd965a0f1fade686994149d5740e (diff) | |
download | brdo-89b0570d707e7a895a832f877dcdc74b68d26d42.tar.gz brdo-89b0570d707e7a895a832f877dcdc74b68d26d42.tar.bz2 |
#305566 by agentrickard and moshe weitzman: Split 'bypass node access' from 'administer nodes'.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 0f8c5f9fd..176804062 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1176,12 +1176,16 @@ function node_perm() { ), 'administer nodes' => array( 'title' => t('Administer nodes'), - 'description' => t('Manage all website content, and bypass any content-related access control. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + 'description' => t('Manage all information associated with site content, such as author, publication date and current revision. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), ), 'access content' => array( 'title' => t('Access content'), 'description' => t('View published content.'), ), + 'bypass node access' => array( + 'title' => t('Bypass node access'), + 'description' => t('View, edit and delete all site content. Users with this permission will bypass any content-related access control. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), + ), 'view revisions' => array( 'title' => t('View revisions'), 'description' => t('View content revisions.'), @@ -2100,7 +2104,7 @@ function node_access($op, $node, $account = NULL) { return FALSE; } - if (user_access('administer nodes', $account)) { + if (user_access('bypass node access', $account)) { return TRUE; } @@ -2157,7 +2161,7 @@ function node_access($op, $node, $account = NULL) { * An SQL join clause. */ function _node_access_join_sql($node_alias = 'n', $node_access_alias = 'na') { - if (user_access('administer nodes')) { + if (user_access('bypass node access')) { return ''; } @@ -2179,7 +2183,7 @@ function _node_access_join_sql($node_alias = 'n', $node_access_alias = 'na') { * An SQL where clause. */ function _node_access_where_sql($op = 'view', $node_access_alias = 'na', $account = NULL) { - if (user_access('administer nodes')) { + if (user_access('bypass node access')) { return; } |