Index: revision_moderation.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/revision_moderation/revision_moderation.install,v
retrieving revision 1.3
diff -u -r1.3 revision_moderation.install
--- revision_moderation.install	14 Feb 2007 14:06:33 -0000	1.3
+++ revision_moderation.install	17 Dec 2007 22:28:27 -0000
@@ -59,6 +59,24 @@
   return $ret;
 }
 
+function revision_moderation_update_2() {
+  $ret = array();
+	if (variable_get('revision_moderation_exempt', 1)){
+		switch ($GLOBALS['db_type']) {
+	    case 'mysql':
+	    case 'mysqli':
+	      $ret[] = update_sql("
+            UPDATE permission 
+            SET perm = CONCAT(perm, ', bypass revision moderation')
+	      ");
+	      break;
+	    case 'pgsql':
+	  }
+    variable_del('revision_moderation_exempt');  
+	}
+  return $ret;
+}
+
 /**
  * Implementation of hook_uninstall().
  */
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	17 Dec 2007 22:14:55 -0000
@@ -65,16 +65,11 @@
 }
 
 /**
- * Menu callback; admin settings page.
+ * Implementation of hook_perm().
  */
-function revision_moderation_settings() {
-  $form['revision_moderation_exempt'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Exempt administrators from revision moderation'),
-    '#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);
+
+function revision_moderation_perm() {
+  return array('bypass revision moderation');
 }
 
 /**
@@ -166,7 +161,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('bypass revision moderation'))) {
     switch ($op) {
       case 'prepare':
         // If user has a pending revision for this node, load the latest version of
