--- view_unpublished.module
+++ (clipboard)
@@ -14,10 +14,11 @@
  * a new permission for each content type.
  */
 function view_unpublished_perm() {
-  $perms = array('view all unpublished content');
+  $perms = array('view all unpublished content', 'edit all unpublished content',);
 
   foreach (node_get_types() as $type => $name) {
     $perms[] = 'view unpublished ' . $type . ' content';
+    $perms[] = 'edit unpublished ' . $type . ' content';
   }
  
   return $perms;
@@ -29,26 +30,29 @@
  * Modifies the path node/nid to use our access callback.
  */
 function view_unpublished_menu_alter(&$items) { 
+  $old_access_callback = $items['node/%node']['access callback'];
   $items['node/%node']['access callback'] = '_view_unpublished_node_access';
-  $items['node/%node']['access arguments'] = array(1);
+  $items['node/%node']['access arguments'] = array('view', 1, $old_access_callback);
+  $items['node/%node/edit']['access callback'] = '_view_unpublished_node_access';
+  $items['node/%node/edit']['access arguments'] = array('edit', 1, $old_access_callback);
 }
 
 /**
  * Returns true if the user has 'view all unpublished content' or if
  * they have the permission corresponding to the node's content type.
  */
-function _view_unpublished_node_access($node) {
+function _view_unpublished_node_access($op, $node, $old_access_callback = 'node_access') {
   // Only check permissions on nodes that are unpublished.
   if ($node->status == 0) {
-    if (user_access('view all unpublished content')) {
+    if (user_access($op .' all unpublished content')) {
       return TRUE;
     }
 
-    if (user_access('view unpublished ' . $node->type . ' content')) {
+    if (user_access($op .' unpublished ' . $node->type . ' content')) {
       return TRUE;
     }
   }
   
-  // If none of the above conditions were satisfied, then use node_access like normal.
-  return node_access('view', $node);
+  // If none of the above conditions were satisfied, then use original access callback.
+  return $old_access_callback($op == 'edit' ? 'update' : $op, $node);
 }
