summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-11 18:29:20 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-11 18:29:20 +0000
commit89b0570d707e7a895a832f877dcdc74b68d26d42 (patch)
tree3e75c6d51a2a4798e7bd03774d7df1feb90a7af0 /modules/system
parent5dde02bb0c2cfd965a0f1fade686994149d5740e (diff)
downloadbrdo-89b0570d707e7a895a832f877dcdc74b68d26d42.tar.gz
brdo-89b0570d707e7a895a832f877dcdc74b68d26d42.tar.bz2
#305566 by agentrickard and moshe weitzman: Split 'bypass node access' from 'administer nodes'.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.install23
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index cbdc52ff8..3a5904dfd 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -3048,6 +3048,29 @@ function system_update_7010() {
}
/**
+ * Split the 'bypass node access' permission from 'administer nodes'.
+ */
+function system_update_7011() {
+ $ret = array();
+ // Get existing roles that can 'administer nodes'.
+ $rids = array();
+ $rids = db_query("SELECT rid FROM {role_permission} WHERE permission = :perm", array(':perm' => 'administer nodes'))->fetchCol();
+ // None found.
+ if (empty($rids)) {
+ return $ret;
+ }
+ $insert = db_insert('role_permission')->fields(array('rid', 'permission'));
+ foreach ($rids as $rid) {
+ $insert->values(array(
+ 'rid' => $rid,
+ 'permission' => 'bypass node access',
+ ));
+ }
+ $insert->execute();
+ return $ret;
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/