[Fusionforge-commits] FusionForge branch Branch_5_1 updated. 91124f3e4cc418eefd8b93ac0d478b424c92f21e

Thorsten Glaser mirabilos at fusionforge.org
Tue Jan 21 19:59:10 CET 2014


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, Branch_5_1 has been updated
       via  91124f3e4cc418eefd8b93ac0d478b424c92f21e (commit)
      from  a87dc4c23ce452b0fb0e454b7359eafa9f90d1d1 (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 -----------------------------------------------------------------
commit 91124f3e4cc418eefd8b93ac0d478b424c92f21e
Author: Thorsten Glaser <t.glaser at tarent.de>
Date:   Tue Jan 21 19:58:53 2014 +0100

    fix bug in group approval when template has forums disabled

diff --git a/src/common/include/RBAC.php b/src/common/include/RBAC.php
index fa2a00d..a1d4bd8 100644
--- a/src/common/include/RBAC.php
+++ b/src/common/include/RBAC.php
@@ -558,33 +558,38 @@ abstract class BaseRole extends Error {
 			}
 		}
 
-		$atf = new ArtifactTypeFactory ($project) ;
-		if (!$atf->isError()) {
-			$tids = $atf->getAllArtifactTypeIds () ;
-			foreach ($tids as $tid) {
-				$result['tracker'][$tid] = $this->getVal ('tracker', $tid) ;
+		if ($project->usesTracker()) {
+			$atf = new ArtifactTypeFactory ($project) ;
+			if (!$atf->isError()) {
+				$tids = $atf->getAllArtifactTypeIds () ;
+				foreach ($tids as $tid) {
+					$result['tracker'][$tid] = $this->getVal ('tracker', $tid) ;
+				}
 			}
+			$sections[] = 'tracker' ;
 		}
-		$sections[] = 'tracker' ;
 
-		$ff = new ForumFactory ($project) ;
-		if (!$ff->isError()) {
-			$fids = $ff->getAllForumIds();
-			foreach ($fids as $fid) {
-				$result['forum'][$fid] = $this->getVal('forum', $fid);
+		if ($project->usesForum()) {
+			$ff = new ForumFactory ($project) ;
+			if (!$ff->isError()) {
+				$fids = $ff->getAllForumIds();
+				foreach ($fids as $fid) {
+					$result['forum'][$fid] = $this->getVal('forum', $fid);
+				}
 			}
+			$sections[] = 'forum' ;
 		}
-		$sections[] = 'forum' ;
 
-		$pgf = new ProjectGroupFactory ($project) ;
-		if (!$pgf->isError()) {
-			$pgids = $pgf->getAllProjectGroupIds();
-			foreach ($pgids as $pgid) {
-				$result['pm'][$pgid] = $this->getVal('pm', $pgid);
+		if ($project->usesPM()) {
+			$pgf = new ProjectGroupFactory ($project) ;
+			if (!$pgf->isError()) {
+				$pgids = $pgf->getAllProjectGroupIds();
+				foreach ($pgids as $pgid) {
+					$result['pm'][$pgid] = $this->getVal('pm', $pgid);
+				}
 			}
+			$sections[] = 'pm' ;
 		}
-		$sections[] = 'pm' ;
-
 
 		if (USE_PFO_RBAC) {
 			// Add settings not yet listed so far (probably plugins)

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

Summary of changes:
 src/common/include/RBAC.php |   43 ++++++++++++++++++++++++-------------------
 1 file changed, 24 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list