[Fusionforge-commits] r7080 - trunk/gforge/www/project/admin

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Thu Feb 26 20:41:42 CET 2009


Author: aljeux
Date: 2009-02-26 20:41:42 +0100 (Thu, 26 Feb 2009)
New Revision: 7080

Modified:
   trunk/gforge/www/project/admin/roleedit.php
Log:
Display in roleedit only module used by the project

Modified: trunk/gforge/www/project/admin/roleedit.php
===================================================================
--- trunk/gforge/www/project/admin/roleedit.php	2009-02-26 19:41:36 UTC (rev 7079)
+++ trunk/gforge/www/project/admin/roleedit.php	2009-02-26 19:41:42 UTC (rev 7080)
@@ -91,6 +91,8 @@
 
 project_admin_header(array('title'=>_('Edit Role'),'group'=>$group_id));
 
+$group = group_get_object($group_id);
+
 //
 //	If observer role, show title
 //
@@ -131,12 +133,20 @@
 $j = 0;
 $keys = array_keys($role->role_values);
 for ($i=0; $i<count($keys); $i++) {
+        if ((!$group->usesForum() && ereg("forum", $keys[$i])) ||
+                (!$group->usesTracker() && ereg("tracker", $keys[$i])) ||
+                (!$group->usesPM() && ereg("pm", $keys[$i])) ||
+                (!$group->usesFRS() && ereg("frs", $keys[$i])) ||
+                (!$group->usesSCM() && ereg("scm", $keys[$i])) ||
+                (!$group->usesDocman() && ereg("docman", $keys[$i]))) {
 
+                //We don't display modules not used
 
+
 //
 //	Handle forum settings for all roles
 //
-	if ($keys[$i] == 'forum' || $keys[$i] == 'forumpublic' || $keys[$i] == 'forumanon') {
+	} elseif ($keys[$i] == 'forum' || $keys[$i] == 'forumpublic' || $keys[$i] == 'forumanon') {
 
 		if ($keys[$i] == 'forumanon') {
 			//skip as we have special case below




More information about the Fusionforge-commits mailing list