[Fusionforge-commits] FusionForge branch 6.0 updated. v6.0.2-99-g1a2c1de

Sylvain Beucler beuc-inria at libremir.placard.fr.eu.org
Tue Oct 6 12:02:47 CEST 2015


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.0 has been updated
       via  1a2c1deb3dee8f1760e354e4af853727f068b061 (commit)
       via  210f708ef35d9eee495fe8f2483f20870b6a8b03 (commit)
       via  92c85a93862d714a50b01fe6eae58f0b00aeaaf8 (commit)
      from  9cf7e1a15347c0d7b306d28a6f8945f7765d3506 (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=1a2c1deb3dee8f1760e354e4af853727f068b061

commit 1a2c1deb3dee8f1760e354e4af853727f068b061
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Oct 6 10:59:32 2015 +0200

    groups: update internal cache when adding/removing users (a.k.a. caching is Bad)

diff --git a/src/CHANGES b/src/CHANGES
index 5a00bc9..0a241c0 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -1,6 +1,7 @@
 Fusionforge 6.0.3:
 * Layout: fix rss url when url is absolute (TrivialDev)
 * Accounts: accept more elliptic curve ssh keys types (Unit 193 & Inria)
+* Accounts: fix missing system privileges when using "Add Users From List" (Inria)
 * Docman: fix filesize sort [#784] (TrivialDev)
 * News: allow moderating news comments even if the Forum tool is disabled (Inria)
 * Plugin SCM: fix race condition when creating project with SCM selected (Inria)
diff --git a/src/common/include/Group.class.php b/src/common/include/Group.class.php
index 61bb4b8..7a7e9d4 100644
--- a/src/common/include/Group.class.php
+++ b/src/common/include/Group.class.php
@@ -2087,6 +2087,21 @@ class Group extends Error {
 		//
 		$this->addHistory(_('Added User'),$user_identifier);
 		db_commit();
+
+		//
+		// Update cache
+		//
+		$add_u = user_get_object($user_id);
+		$found = false;
+		foreach ($this->membersArr as $u) {
+			if ($u->getID() == $add_u->getID()) {
+				$found = true;
+				break;
+			}
+		}
+		if (!$found)
+			$this->membersArr[] = $add_u;
+
 		return true;
 	}
 
@@ -2200,6 +2215,18 @@ class Group extends Error {
 		$this->addHistory(_('Removed User'),$user_id);
 
 		db_commit();
+
+		//
+		// Update cache
+		//
+		$del_u = user_get_object($user_id);
+		foreach ($this->membersArr as $k => $u) {
+			if ($u->getID() == $del_u->getID()) {
+				unset($this->membersArr[$k]);
+				break;
+			}
+		}
+
 		return true;
 	}
 

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=210f708ef35d9eee495fe8f2483f20870b6a8b03

commit 210f708ef35d9eee495fe8f2483f20870b6a8b03
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Oct 6 10:54:29 2015 +0200

    systasksd: err on the safe side when applying new users on the system, to avoid potential concurrency issues

diff --git a/src/bin/systasksd b/src/bin/systasksd
index 978b4da..7de8533 100755
--- a/src/bin/systasksd
+++ b/src/bin/systasksd
@@ -38,13 +38,13 @@ function usergroups_sync() {
 	global $usergroups_lastsync;
 	$res = db_query_params("SELECT MAX(last_modified_date) AS lastmodified FROM nss_usergroups");
 	$row = db_fetch_array($res);
-	if ($row['lastmodified'] > $usergroups_lastsync) {
+	if ($row['lastmodified'] >= $usergroups_lastsync) {
+		$usergroups_lastsync = time();
 		cron_reload_nscd();
 		cron_regen_apache_auth();
 		cron_reload_apache();
 		$hook_params = array();
 		plugin_hook("usergroups_sync", $hook_params);
-		$usergroups_lastsync = time();
 	}
 }
 

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=92c85a93862d714a50b01fe6eae58f0b00aeaaf8

commit 92c85a93862d714a50b01fe6eae58f0b00aeaaf8
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Oct 6 10:53:25 2015 +0200

    Doc fix

diff --git a/src/common/include/system/pgsql.class.php b/src/common/include/system/pgsql.class.php
index 2b8da1c..910258a 100644
--- a/src/common/include/system/pgsql.class.php
+++ b/src/common/include/system/pgsql.class.php
@@ -163,12 +163,12 @@ class pgsql extends System {
 	/**
  	* sysCheckCreateGroup() - Check that a group has been created
  	*
- 	* @param	int	$user_id	The ID of the user to check
+ 	* @param	int	$group_id	The ID of the group to check
  	* @return	bool			true on success/false on error
  	*
  	*/
-	function sysCheckCreateGroup($user_id) {
-		return $this->sysCreateGroup($user_id);
+	function sysCheckCreateGroup($group_id) {
+		return $this->sysCreateGroup($group_id);
 	}
 
 	/**

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

Summary of changes:
 src/CHANGES                               |  1 +
 src/bin/systasksd                         |  4 ++--
 src/common/include/Group.class.php        | 27 +++++++++++++++++++++++++++
 src/common/include/system/pgsql.class.php |  6 +++---
 4 files changed, 33 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list