Index: revision_moderation.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/revision_moderation/revision_moderation.module,v retrieving revision 1.37 diff -u -r1.37 revision_moderation.module --- revision_moderation.module 20 Feb 2007 15:54:55 -0000 1.37 +++ revision_moderation.module 7 Dec 2007 17:34:00 -0000 @@ -74,10 +74,19 @@ '#default_value' => variable_get('revision_moderation_exempt', 1), '#description' => t('With this option enabled, users with the "administer nodes" privilege will bypass the moderation system, and their revisions will be published immediately.'), ); + return system_settings_form($form); } /** + * Implementation of hook_perm(). + */ + +function revision_moderation_perm() { + return array('bypass revision moderation'); +} + +/** * Implementation of hook_form_alter(). */ function revision_moderation_form_alter($form_id, &$form) { @@ -166,7 +175,7 @@ // Only do this logic for non-admin users on nodes with revision moderation // turned on. - if ($node->nid && $node->revision_moderation == 1 && (!user_access('administer nodes') || !variable_get('revision_moderation_exempt', 1))) { + if ($node->nid && $node->revision_moderation == 1 && (!user_access('administer nodes') || !user_access('bypass revision moderation') || !variable_get('revision_moderation_exempt', 1))) { switch ($op) { case 'prepare': // If user has a pending revision for this node, load the latest version of