? 000-seven-form-css-sanity.patch
? 690828-block-ahah_0.patch
? 732542-system-goto-action-D7.patch
? 735528-states-or.patch
? 823428-entity-uri-34.patch
? 846296-file-download.patch
? 846296-file-download2.patch
? 890716-file-settings.patch
? 920614-node-access-new-column.patch
? 920614-node-access.patch
? file_download_access6.patch
? test.patch
? sites/default/files
? sites/default/private
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1302
diff -u -p -r1.1302 node.module
--- modules/node/node.module	24 Sep 2010 00:37:43 -0000	1.1302
+++ modules/node/node.module	25 Sep 2010 17:00:25 -0000
@@ -3158,13 +3158,18 @@ function node_access_acquire_grants($nod
   drupal_alter('node_access_records', $grants, $node);
   // If no grants are set, then use the default grant.
   if (empty($grants)) {
-    $grants[] = array('realm' => 'all', 'gid' => 0, 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0);
+    $grants[] = array('realm' => 'all', 'gid' => 0, 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0, 'priority' => 0);
   }
   else {
     // Retain grants by highest priority.
     $grant_by_priority = array();
     foreach ($grants as $g) {
+      // If the node is not published, we cannot allow 'view' access.
+      if (!$node->status) {
+        $g['grant_view'] = 0;
+      }
       $grant_by_priority[intval($g['priority'])][] = $g;
+      
     }
     krsort($grant_by_priority);
     $grants = array_shift($grant_by_priority);
