[Fusionforge-commits] r10286 - branches/Branch_5_0/gforge/plugins/scmsvn/common

Olivier Meunier musicoliv at libremir.placard.fr.eu.org
Thu Jul 22 17:34:33 CEST 2010


Author: musicoliv
Date: 2010-07-22 17:34:33 +0200 (Thu, 22 Jul 2010)
New Revision: 10286

Modified:
   branches/Branch_5_0/gforge/plugins/scmsvn/common/SVNPlugin.class.php
Log:
Backported parts of r10029 from trunk: fixes svn repos rights and ownership when using DAV access

Modified: branches/Branch_5_0/gforge/plugins/scmsvn/common/SVNPlugin.class.php
===================================================================
--- branches/Branch_5_0/gforge/plugins/scmsvn/common/SVNPlugin.class.php	2010-07-22 09:37:47 UTC (rev 10285)
+++ branches/Branch_5_0/gforge/plugins/scmsvn/common/SVNPlugin.class.php	2010-07-22 15:34:33 UTC (rev 10286)
@@ -200,15 +200,15 @@
 		}
 
 		$repo = $this->svn_root . '/' . $project->getUnixName() ;
-		$unix_group = 'scm_' . $project->getUnixName() ;
 
 		if (!is_dir ($repo) || !is_file ("$repo/format")) {
 			system ("svnadmin create $repo") ;
 			system ("svn mkdir -m'Init' file:///$repo/trunk file:///$repo/tags file:///$repo/branches") ;
-			system ("find $repo -type d | xargs chmod g+s") ;
 		}
 
 		if ($this->use_ssh) {
+			$unix_group = 'scm_' . $project->getUnixName() ;
+			system ("find $repo -type d | xargs chmod g+s") ;
 			system ("chgrp -R $unix_group $repo") ;
 			if ($project->enableAnonSCM()) {
 				system ("chmod -R g+wX,o+rX-w $repo") ;
@@ -217,12 +217,9 @@
 			}
 		} else {
 			$unix_user = $GLOBALS['sys_apache_user'];
+			$unix_group = $GLOBALS['sys_apache_group'];
 			system ("chown -R $unix_user:$unix_group $repo") ;
-			if ($project->enableAnonSCM()) {
-				system ("chmod -R g+wX,o+rX-w $repo") ;
-			} else {
-				system ("chmod -R g+wX,o-rwx $repo") ;
-			}
+			system ("chmod -R g-rwx,o-rwx $repo") ;
 		}
 	}
 




More information about the Fusionforge-commits mailing list