[Fusionforge-commits] r7586 - in trunk/gforge: . etc/local.d www/frs

Roland Mas lolando at libremir.placard.fr.eu.org
Tue May 5 13:28:37 CEST 2009


Author: lolando
Date: 2009-05-05 13:28:37 +0200 (Tue, 05 May 2009)
New Revision: 7586

Modified:
   trunk/gforge/etc/local.d/25features
   trunk/gforge/setup
   trunk/gforge/www/frs/download.php
Log:
New configuration option to allow/block anonymous downloads (defaults to allow)

Modified: trunk/gforge/etc/local.d/25features
===================================================================
--- trunk/gforge/etc/local.d/25features	2009-05-05 11:28:28 UTC (rev 7585)
+++ trunk/gforge/etc/local.d/25features	2009-05-05 11:28:37 UTC (rev 7586)
@@ -51,3 +51,5 @@
 
 // Require acceptance of terms and conditions
 $sys_require_accept_conditions={sys_require_accept_conditions};
+// Block anonymous downloads?
+$sys_block_anonymous_downloads={sys_block_anonymous_downloads};

Modified: trunk/gforge/setup
===================================================================
--- trunk/gforge/setup	2009-05-05 11:28:28 UTC (rev 7585)
+++ trunk/gforge/setup	2009-05-05 11:28:37 UTC (rev 7586)
@@ -128,6 +128,7 @@
 	DEFAULTsys_apache_user=$(findapacheowner)
 	DEFAULTsys_apache_group=$(findapacheowner)
 	DEFAULTsys_forum_return_domain=$DEFAULTdomain_name
+	DEFAULTsys_block_anonymous_downloads=false
 	#
 	# TODO
 	#usr_lib_gforge=$GFGDIR

Modified: trunk/gforge/www/frs/download.php
===================================================================
--- trunk/gforge/www/frs/download.php	2009-05-05 11:28:28 UTC (rev 7585)
+++ trunk/gforge/www/frs/download.php	2009-05-05 11:28:37 UTC (rev 7586)
@@ -81,6 +81,11 @@
 		exit_permission_denied();
 	}
 }
+if ($GLOBALS['sys_block_anonymous_downloads']) {
+	if (!session_loggedin()) {
+		exit_permission_denied();
+	}
+}
 
 $filepath=$sys_upload_dir.'/'.$Group->getUnixName().'/'.$Package->getFileName().'/'.$Release->getFileName().'/'.$File->getName();
 if (file_exists($filepath)) {




More information about the Fusionforge-commits mailing list