[Fusionforge-commits] r10673 - trunk/src/common/include

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Sep 24 17:03:58 CEST 2010


Author: lolando
Date: 2010-09-24 17:03:58 +0200 (Fri, 24 Sep 2010)
New Revision: 10673

Modified:
   trunk/src/common/include/Role.class.php
Log:
Fewer references to the user_group table when USE_PFO_RBAC

Modified: trunk/src/common/include/Role.class.php
===================================================================
--- trunk/src/common/include/Role.class.php	2010-09-24 14:54:31 UTC (rev 10672)
+++ trunk/src/common/include/Role.class.php	2010-09-24 15:03:58 UTC (rev 10673)
@@ -600,16 +600,16 @@
 				$this->setPermissionDeniedError();
 				return false;
 			}
+			
+			return $this->addUser (user_get_object($user_id)) ;
 		} else {
 			$perm =& $this->Group->getPermission ();
 			if (!$perm || !is_object($perm) || $perm->isError() || !$perm->isAdmin()) {
 				$this->setPermissionDeniedError();
 				return false;
 			}
-		}
 
 		db_begin();
-
 		//
 		//	See if role is actually changing
 		//
@@ -761,6 +761,7 @@
 
 		db_commit();
 		return true;
+		}
 
 	}
 




More information about the Fusionforge-commits mailing list