Index: modules/cvslog/cvs.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cvslog/cvs.module,v
retrieving revision 1.102
diff -u -F^f -r1.102 cvs.module
--- modules/cvslog/cvs.module	22 May 2006 17:48:43 -0000	1.102
+++ modules/cvslog/cvs.module	22 May 2006 18:32:16 -0000
@@ -270,6 +270,12 @@ function cvs_settings() {
     '#default_value' => variable_get('cvs_allow_repo_selection', ''),
     '#description' => t('This comma-separated list of project titles controls which projects are allowed to select their CVS repository. Any projects not listed here will automatically use the default repository.'),
   );
+  $form['cvs_restrict_project_creation'] = array(
+    '#title' => t('Restrict project creation to users with CVS accounts'),
+    '#type' => 'checkbox',
+    '#default_value' => variable_get('cvs_restrict_project_creation', 0),
+    '#description' => t('If this box is checked, only users with CVS accounts will be allowed to create projects.'),
+  );
 
   return $form;
 }
Index: modules/project/project.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project/project.inc,v
retrieving revision 1.76
diff -u -F^f -r1.76 project.inc
--- modules/project/project.inc	20 May 2006 20:45:39 -0000	1.76
+++ modules/project/project.inc	22 May 2006 18:32:17 -0000
@@ -490,6 +490,10 @@ function project_project_access($op, $no
     case 'view':
       return user_access('access projects') || (user_access('access own projects') && $node->uid == $user->uid);
     case 'create':
+      if ($user->uid && module_exist('cvs') && variable_get('cvs_restrict_project_creation',0)) {
+        $has_cvs = db_result(db_query("SELECT uid FROM {cvs_accounts} WHERE uid = %d", $user->uid), 0);        
+        return $has_cvs && user_access('maintain projects');
+      }
       return user_access('maintain projects') && $user->uid;
     case 'update':
     case 'delete':
