--- workbench_moderation/workbench_moderation.module	Tue Oct 02 16:37:36 2012
+++ workbench_moderation/workbench_moderation.module	Tue Oct 02 16:27:23 2012
@@ -428,6 +428,9 @@
         $permissions["moderate $node_type state from $from_state to $to_state"] = array(
           'title' => t('Moderate @node_type state from @from_state to @to_state', array('@node_type' => node_type_get_name($node_type), '@from_state' => workbench_moderation_state_label($from_state), '@to_state' => workbench_moderation_state_label($to_state))),
         );
+        $permissions["moderate own $node_type state from $from_state to $to_state"] = array(
+          'title' => t('Moderate own @node_type state from @from_state to @to_state', array('@node_type' => node_type_get_name($node_type), '@from_state' => workbench_moderation_state_label($from_state), '@to_state' => workbench_moderation_state_label($to_state))),
+        );
       }
     }
   }
@@ -990,7 +993,7 @@
  * @return
  *   Bollean TRUE or FALSE.
  */
-function workbench_moderation_state_allowed($account, $from_state, $to_state, $node_type) {
+function workbench_moderation_state_allowed($account, $from_state, $to_state, $node_type, $node = NULL) {
   // Allow super-users to moderate all content.
   if (user_access("bypass workbench moderation", $account)) {
     return TRUE;
@@ -1006,6 +1009,13 @@
     return TRUE;
   }
 
+  // Are we testing ownership?
+  if ($node !== NULL and $node->uid == $account->uid) {
+    if (variable_get('workbench_moderation_per_node_type', FALSE) && user_access("moderate own $node_type state from $from_state to $to_state", $account)) {
+      return TRUE;
+    }
+  }
+
   // Default return.
   return FALSE;
 }
@@ -1438,7 +1448,7 @@
     // workbench_moderation_state_allowed().
     if ($states) {
       foreach ($states as $machine_name => $label) {
-        if (!workbench_moderation_state_allowed($account, $current_state, $machine_name, $node->type)) {
+        if (!workbench_moderation_state_allowed($account, $current_state, $machine_name, $node->type, $node)) {
           unset($states[$machine_name]);
         }
       }
