From 02ec80c140d0dff07a5ebffb0182f32e9e329843 Sun, 18 Sep 2011 20:32:39 -0700
From: Geoff Appleby <gapple@490940.no-reply.drupal.org>
Date: Sun, 18 Sep 2011 20:09:20 -0700
Subject: [PATCH] #239139: Do not hijack the 'all' realm


diff --git a/content_access.module b/content_access.module
index 9a87564..06b918f 100644
--- a/content_access.module
+++ b/content_access.module
@@ -103,6 +103,7 @@
  */
 function content_access_node_grants($account, $op) {
   return array(
+    'content_access_all' => 0,
     'content_access_author' => array($account->uid),
     'content_access_rid' => array_keys($account->roles),
   );
@@ -506,9 +507,9 @@
   // Detect if all are allowed to view
   $all = array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID);
   if (count(array_diff($all, $rids['view'])) == 0) {
-    //grant view access to all instead of single roles
+    // Grant view access to all instead of single roles
     $rids['view'] = array('all');
-    $grants['all'] = array('realm' => 'all', 'gid' => 0, 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0, 'priority' => content_access_get_settings('priority', $node->type));
+    $grants['all'] = array('realm' => 'content_access_all', 'gid' => 0, 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0, 'priority' => content_access_get_settings('priority', $node->type));
   }
 
   // If authenticated users are involved, remove unnecessary other roles.
