summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-10 04:28:15 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-10 04:28:15 +0000
commitf8790b17b3fe09d6039278c560d7b2ffd717619d (patch)
tree0d97c6f2fc8692fdfeae3cc47ef8c441c3ba8dd1 /modules/system/system.install
parent731126f4997ddc3e018e8a78822aa628b757bd3a (diff)
downloadbrdo-f8790b17b3fe09d6039278c560d7b2ffd717619d.tar.gz
brdo-f8790b17b3fe09d6039278c560d7b2ffd717619d.tar.bz2
#452538 by Mike Wacker: Allow node access modules to have control over unpublished nodes. (with tests)
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index 3062a58fd..c1ab41c16 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -407,7 +407,7 @@ function system_install() {
));
// Authenticated role permissions.
- foreach (array('access comments', 'access content', 'post comments', 'post comments without approval') as $permission) {
+ foreach (array('access comments', 'access content', 'post comments', 'post comments without approval', 'view own unpublished content') as $permission) {
$query->values(array(
'rid' => DRUPAL_AUTHENTICATED_RID,
'permission' => $permission,
@@ -2226,6 +2226,21 @@ function system_update_7028() {
}
/**
+ * Add new 'view own unpublished content' permission for authenticated users.
+ * Preserves legacy behavior from Drupal 6.x.
+ */
+function system_update_7029() {
+ $ret = array();
+ db_insert('role_permission')
+ ->fields(array(
+ 'rid' => DRUPAL_AUTHENTICATED_RID,
+ 'permission' => 'view own unpublished content',
+ ))
+ ->execute();
+ return $ret;
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/