Index: uc_termsofservice.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_termsofservice/uc_termsofservice.module,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 uc_termsofservice.module
--- uc_termsofservice.module	2 Jan 2010 20:18:11 -0000	1.1.2.5
+++ uc_termsofservice.module	20 Jan 2010 23:03:55 -0000
@@ -235,7 +235,7 @@ function uc_termsofservice_admin_form($t
 
     $form['uc_termsofservice_'. $type .'_node'] = array(
       '#type' => 'textfield',
-      '#title' => t('Select the node that corresponds to the Terms of Service'),
+      '#title' => t('Select the node that corresponds to the Terms of Service. Note that this node will be shown regardless of node access permissions.'),
       '#autocomplete_path' => 'uc_termsofservice/node/autocomplete',
       '#default_value' => variable_get('uc_termsofservice_'. $type .'_node', NULL),
       '#weight' => 0,
@@ -288,6 +288,9 @@ function uc_termsofservice_node_autocomp
       $arg = $string;
       $where = "LOWER(title) LIKE LOWER('%%%s%%')";
     }
+    if (!user_access('administer nodes')) {
+      $where .= " AND n.status = 1";
+    }
     $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.name FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE $where"), $arg, 0, 10);
 
     $matches = array();
