[Fusionforge-commits] r9829 - trunk/gforge/common/include

Roland Mas lolando at libremir.placard.fr.eu.org
Fri May 21 09:54:48 CEST 2010


Author: lolando
Date: 2010-05-21 09:54:48 +0200 (Fri, 21 May 2010)
New Revision: 9829

Modified:
   trunk/gforge/common/include/RBAC.php
Log:
Handle new level for forums: posting without moderation

Modified: trunk/gforge/common/include/RBAC.php
===================================================================
--- trunk/gforge/common/include/RBAC.php	2010-05-21 07:54:21 UTC (rev 9828)
+++ trunk/gforge/common/include/RBAC.php	2010-05-21 07:54:48 UTC (rev 9829)
@@ -133,6 +133,16 @@
 					$newsection = 'forum_admin' ;
 					break ;
 
+				case 'newtracker':
+					$newsection = 'new_tracker' ;
+					break ;
+				case 'newpm':
+					$newsection = 'new_pm' ;
+					break ;
+				case 'newforum':
+					$newsection = 'new_forum' ;
+					break ;
+
 				default:
 					$newsection = $oldsection ;
 				}
@@ -160,7 +170,9 @@
 					break;
 					
 					case 'tracker':
+					case 'new_tracker':
 					case 'pm':
+					case 'new_pm':
 						switch ($oldvalue) {
 						case '-1': $newvalue = 0 ; break ;
 						case '0': $newvalue = 1 ; break ;
@@ -195,6 +207,16 @@
 						}
 						break ;
 
+					case 'forum':
+					case 'new_forum':
+						switch ($oldvalue) {
+						case '-1': $newvalue = 0 ; break ;
+						case '0': $newvalue = 2 ; break ;
+						case '1': $newvalue = 3 ; break ;
+						case '2': $newvalue = 4 ; break ;
+						}
+						break ;
+			
 					default:
 						$newvalue = $oldvalue ;
 						$newreference = $oldreference ;
@@ -328,9 +350,12 @@
 			case 'post':
 				$min = 2 ;
 				break ;
-			case 'moderate':
+			case 'unmoderated_post':
 				$min = 3 ;
 				break ;
+			case 'moderate':
+				$min = 4 ;
+				break ;
 			}
 			if (($value >= $min)
 			    || $this->hasPermission ('forum_admin', $reference)) {




More information about the Fusionforge-commits mailing list