Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.771 diff -u -p -r1.771 node.module --- modules/node/node.module 9 Jan 2007 09:11:44 -0000 1.771 +++ modules/node/node.module 10 Jan 2007 06:57:36 -0000 @@ -1864,10 +1864,21 @@ function node_submit($node) { $node->created = $node->date ? strtotime($node->date) : NULL; } - // Force defaults in case people modify the form: - $node_options = variable_get('node_options_'. $node->type, array('status', 'promote')); + + // Process the workflow options and provide defaults. If the user + // can not administer nodes, ignore the form and either use the + // saved values if the node exists, or force the defaults. + if (!$access && $node->nid) { + $saved_node = node_load($node->nid); + } + else { + $node_options = variable_get('node_options_'. $node->type, array('status', 'promote')); + } foreach (array('status', 'promote', 'sticky', 'revision') as $key) { - if (!$access || !isset($node->$key)) { + if (!$access && $node->nid) { + $node->$key = $saved_node->$key; + } + else if (!isset($node->$key) || !$access) { $node->$key = in_array($key, $node_options); } }