[Fusionforge-commits] FusionForge branch 6.1 updated. v6.1beta1-27-ge3c4d37

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Dec 30 18:02:45 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.1 has been updated
       via  e3c4d374c61afde78f3e0b52f10b276404cebc25 (commit)
      from  dfb105b0bef8fafa42079e1fee42810bc776b78e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=e3c4d374c61afde78f3e0b52f10b276404cebc25

commit e3c4d374c61afde78f3e0b52f10b276404cebc25
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Dec 30 18:00:17 2017 +0100

    remove dead code about anoncvs_* user

diff --git a/src/common/include/account.php b/src/common/include/account.php
index 777940f..d3e0108 100644
--- a/src/common/include/account.php
+++ b/src/common/include/account.php
@@ -137,10 +137,6 @@ function account_namevalid($name, $unix=false, $check_exists=true) {
 			return false;
 		}
 	}
-	if (preg_match("/^(anoncvs_)/i",$name)) {
-		$GLOBALS['register_error'] = _('Name is reserved for CVS.');
-		return false;
-	}
 
 	return true;
 }
diff --git a/src/common/include/system/LDAP.class.php b/src/common/include/system/LDAP.class.php
index aea5c49..d6f4ee8 100644
--- a/src/common/include/system/LDAP.class.php
+++ b/src/common/include/system/LDAP.class.php
@@ -497,42 +497,6 @@ class LDAP extends UNIX {
 			$ret_val=false;
 		}
 
-		//
-		//	Now create CVS group
-		//
-
-		// Add virtual anoncvs user to CVS group
-		$cvs_member_list[$i_cvs++] = 'anoncvs_'.$group->getUnixName();
-
-		$dn = 'cn='.$group->getUnixName().',ou=cvsGroup,'.forge_get_config('ldap_base_dn');
-
-		if ($cvs_member_list) {
-			$entry['memberUid']=$cvs_member_list;
-		} else {
-			unset($entry['memberUid']);
-		}
-
-		if (!$this->gfLdapAdd($dn,$entry)) {
-			$this->setError("Error: cannot add LDAP CVS group entry '"
-				 .$group->getUnixName()."': ".$this->gfLdapError()."<br />");
-			$ret_val=false;
-		}
-
-		//
-		// Finally, setup AnonCVS virtual user
-		//
-
-			if (!$this->gfLdapcheck_user_by_name('anoncvs_'.$group->getUnixName())
-			&& !$this->gfLdapCreateUserFromProps('scm_'.$group->getUnixName(),
-							'anoncvs', 'x',
-							'/bin/false', '/bin/false',
-							$this->getSCMGID(),
-							$this->getUnixGID(), "/dev/null")) {
-			$this->setError("Error: cannot add LDAP AnonCVS user entry '"
-				 .$group->getUnixName()."': ".$this->gfLdapError()."<br />");
-			$ret_val=false;
-		}
-
 		return $ret_val;
 	}
 
@@ -575,17 +539,6 @@ class LDAP extends UNIX {
 			$ret_val = false;
 		}
 
-		//
-		//	Remove AnonCVS virtual user
-		//
-
-		$dn = 'uid=anoncvs_'.$group->getUnixName().',ou=People,'.forge_get_config('ldap_base_dn');
-		if (!$this->gfLdapDelete($dn)) {
-			$this->setError("Error: cannot delete LDAP AnonCVS user entry '".
-				 $group->getUnixName()."': ".$this->gfLdapError()."<br />");
-			$ret_val = false;
-		}
-
 		return $ret_val;
 	}
 
diff --git a/src/common/valid/Rule.class.php b/src/common/valid/Rule.class.php
index bb3d645..55a9845 100644
--- a/src/common/valid/Rule.class.php
+++ b/src/common/valid/Rule.class.php
@@ -278,10 +278,6 @@ class Rule_UserNameFormat extends Rule {
 				.'|(www)|(cvs)|(shell)|(ftp)|(irc)|(debian)|(ns)|(download))$/i', $val);
 	}
 
-	function isCvsAccount($val) {
-		return preg_match('/^anoncvs_/i', $val);
-	}
-
 	function lessThanMin($val) {
 		return (strlen($val) < 3);
 	}
@@ -292,7 +288,6 @@ class Rule_UserNameFormat extends Rule {
 
 	function isValid($val) {
 		return !$this->isNotLegalName($val)
-			&& !$this->isCvsAccount($val)
 			&& !$this->lessThanMin($val)
 			&& !$this->greaterThanMax($val)
 			&& !$this->containsIllegalChars($val);

-----------------------------------------------------------------------

Summary of changes:
 src/common/include/account.php           |  4 ---
 src/common/include/system/LDAP.class.php | 47 --------------------------------
 src/common/valid/Rule.class.php          |  5 ----
 3 files changed, 56 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list