[evolvis-commits] r18488: prevent manually adding the maven user to a global role

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Jul 12 13:26:18 CEST 2012


Author: mirabilos
Date: 2012-07-12 13:26:18 +0200 (Thu, 12 Jul 2012)
New Revision: 18488

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php
Log:
prevent manually adding the maven user to a global role

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php	2012-07-12 11:26:14 UTC (rev 18487)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php	2012-07-12 11:26:18 UTC (rev 18488)
@@ -1374,8 +1374,14 @@
 	public function addUsers ($users) {
 		global $SYS;
 
+		$mvn =& user_get_ci_user();
+
 		$ids = array () ;
 		foreach ($users as $user) {
+			if ($mvn && $user->getID() == $mvn->getID()) {
+				/* cannot add the maven user */
+				return false;
+			}
 			$ids[] = $user->getID() ;
 		}
 



More information about the evolvis-commits mailing list