[Fusionforge-commits] r7171 - trunk/gforge/plugins/scmcvs/common

Gonéri Le Bouder goneri at libremir.placard.fr.eu.org
Tue Mar 17 17:52:14 CET 2009


Author: goneri
Date: 2009-03-17 17:52:14 +0100 (Tue, 17 Mar 2009)
New Revision: 7171

Modified:
   trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php
Log:
disable the AnonSCN checkbox for private project

Modified: trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2009-03-17 14:18:57 UTC (rev 7170)
+++ trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2009-03-17 16:52:14 UTC (rev 7171)
@@ -194,9 +194,14 @@
 		$group =& group_get_object($params['group_id']);
 		
 		if ($group->usesPlugin($this->name)) {
-			print '<p>
-			<input type="checkbox" name="scmcvs_enable_anoncvs" value="1" '.$this->c($group->enableAnonSCM()).' /><strong>'._('Enable Anonymous Access').'</strong><br />
-			<input type="checkbox" name="scmcvs_enable_pserver" value="1" '.$this->c($group->enablePserver()).' /><strong>'._('Enable pserver').'</strong></p>' ;
+			print '<p>';
+			if ($group->isPublic()) {
+				print '<input type="checkbox" name="scmcvs_enable_anoncvs" value="1" '.$this->c($group->enableAnonSCM()).'/><strong>'._('Enable Anonymous Access').'</strong><br />';
+			} else {
+				print '<input type="checkbox" name="scmcvs_enable_anoncvs" value="1" '.$this->c($group->enableAnonSCM()).' DISABLED/>'._('Enable Anonymous Access').' <strong>'._("You project is private and so, you can't turn Anonymous Access on").'</strong><br />';
+
+			}
+			print '<input type="checkbox" name="scmcvs_enable_pserver" value="1" '.$this->c($group->enablePserver()).' /><strong>'._('Enable pserver').'</strong></p>' ;
 		}
 	}
 




More information about the Fusionforge-commits mailing list