Index: eventrepeat.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/eventrepeat/eventrepeat.module,v
retrieving revision 1.38
diff -u -r1.38 eventrepeat.module
--- eventrepeat.module	7 Sep 2006 00:00:31 -0000	1.38
+++ eventrepeat.module	7 Sep 2006 17:24:53 -0000
@@ -369,7 +369,7 @@
   } elseif ($form['type']['#value'] .'_node_form' == $form_id) {
     if (variable_get('event_nodeapi_'. $form['type']['#value'], 'never') != 'never' &&
       variable_get('eventrepeat_nodeapi_'. $form['type']['#value'], 0) == 1) {
-    
+
       //get the node info from the db if not in edit (remember the edit means we are previewing, usually)
       if (isset($_POST['edit']) && (!empty($_POST['edit']))) {
         $edit = $_POST['edit'];
@@ -377,7 +377,21 @@
       } elseif (isset($form['nid']['#value'])) {
         $node = node_load($form['nid']['#value']);
       }
-            
+
+      // If this is a new node and this user
+      // doesn't have access to create repeating events
+      // just return. 
+      if(!$node->nid && !user_access('create repeat events')){
+        return;
+      }
+      // If, however, this is an existing event that has   
+      // a repeating pattern attached to it, we need to
+      // show the form because otherwise the user would
+      // end up breaking this node out of the repeat.
+      else if($node->nid && (!$node->eventrepeat_rid && !user_access('create repeat events')) ){
+        return;
+      }
+
       // TODO: I'm not sure if this is in the right spot, but this seems to be the only reliable place to put it right now
       // adds a new exception to the list if needed
       _eventrepeat_form_add_exception($node);
