[Fusionforge-commits] r15678 - in branches/Branch_5_1: . src/plugins/scmsvn/common

Roland Mas lolando at fusionforge.org
Thu Jun 7 12:58:57 CEST 2012


Author: lolando
Date: 2012-06-07 12:58:56 +0200 (Thu, 07 Jun 2012)
New Revision: 15678

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/src/plugins/scmsvn/common/SVNPlugin.class.php
Log:
Backport from 5.2: Fix generation of SVN auth file using RBAC API for bug [#446]

Modified: branches/Branch_5_1/src/plugins/scmsvn/common/SVNPlugin.class.php
===================================================================
--- branches/Branch_5_1/src/plugins/scmsvn/common/SVNPlugin.class.php	2012-06-07 08:01:37 UTC (rev 15677)
+++ branches/Branch_5_1/src/plugins/scmsvn/common/SVNPlugin.class.php	2012-06-07 10:58:56 UTC (rev 15678)
@@ -282,8 +282,8 @@
 
 		$access_data = '' ;
 		$password_data = '' ;
+		$engine = RBACEngine::getInstance() ;
 
-		$svnusers = array () ;
 		foreach ($groups as $project) {
 			if ( !$project->isActive()) {
 				continue;
@@ -293,20 +293,16 @@
 			}
 			$access_data .= '[' . $project->getUnixName () . ":/]\n" ;
 			
-			$users = $project->getMembers () ;
+			$users = $engine->getUsersByAllowedAction('scm',$project->getID(),'read');
 			foreach ($users as $user) {
+				$svnusers[$user->getID()] = $user ;
 				if (forge_check_perm_for_user ($user,
 							       'scm',
 							       $project->getID(),
 							       'write')) {
 					$access_data .= $user->getUnixName() . "= rw\n" ;
-					$svnusers[$user->getID()] = $user ;
-				} elseif (forge_check_perm_for_user ($user,
-								     'scm',
-								     $project->getID(),
-								     'read')) {
+				} else {
 					$access_data .= $user->getUnixName() . "= r\n" ;
-					$svnusers[$user->getID()] = $user ;
 				}
 			}
 




More information about the Fusionforge-commits mailing list