[evolvis-commits] r13017: disable the AnonSCN checkbox for private project

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Feb 28 02:14:02 CET 2011


Author: mirabilos
Date: 2011-02-28 02:14:02 +0100 (Mon, 28 Feb 2011)
New Revision: 13017

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

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/plugins/scmcvs/common/CVSPlugin.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2011-02-28 01:14:00 UTC (rev 13016)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2011-02-28 01:14:02 UTC (rev 13017)
@@ -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 evolvis-commits mailing list