Index: stormtask.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormtask/Attic/stormtask.admin.inc,v
retrieving revision 1.8.4.21
diff -u -r1.8.4.21 stormtask.admin.inc
--- stormtask.admin.inc   4 Aug 2009 23:00:18 -0000   1.8.4.21
+++ stormtask.admin.inc   10 Aug 2009 11:24:37 -0000
@@ -51,6 +51,11 @@
     ),
   );
 
+  if (!user_access('stormtask: edit all')) {
+    unset($header[5]);
+    unset($header[6]);
+  }
+
   $where = array();
   $args = array();
 
@@ -269,11 +274,16 @@
     );
   }
 
-  $form['submit'] = array(
-    '#type' => 'submit',
-    '#submit' => array('stormtask_tasks_submit'),
-    '#value' => t('Save'),
-  );
+  if (user_access('Stormtask: edit all')) {
+    // This form is displayed for users which may not have edit permissions for the nodes displayed.
+    // Furthermore, permissions can mean that the user could have edit permissions for some nodes displayed and not others.
+    // Therefore, the submit button must only be displayed if the user has the permission 'edit all', which guarantees the user is allowed to edit all nodes displayed.
+    $form['submit'] = array(
+      '#type' => 'submit',
+      '#submit' => array('stormtask_tasks_submit'),
+      '#value' => t('Save'),
+    );
+  }
 
   return $form;
 }

 