فهرست منبع

Fixed regression (See #556) due to the existence of an overload of the protected API GetUserOrgs, reintegrated from branch 1.2.1

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2101 a333f486-631f-4898-b8df-5754b55c2be0
romainq 13 سال پیش
والد
کامیت
80edee8d2a
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      addons/userrights/userrightsprofile.class.inc.php

+ 6 - 2
addons/userrights/userrightsprofile.class.inc.php

@@ -613,9 +613,13 @@ class UserRightsProfile extends UserRightsAddOnAPI
 
 	/**
 	 * Read and cache organizations allowed to the given user
+	 * 
+	 * @param oUser
+	 * @param sClass -not used here but can be used in overloads
 	 */
-	protected function GetUserOrgs($iUser)
+	protected function GetUserOrgs($oUser, $sClass)
 	{
+		$iUser = $oUser->GetKey();
 		if (!array_key_exists($iUser, $this->m_aUserOrgs))
 		{
 			$this->m_aUserOrgs[$iUser] = array();
@@ -811,7 +815,7 @@ exit;
 		}
 		// Position the user
 		//
-		$aUserOrgs = $this->GetUserOrgs($oUser->GetKey());
+		$aUserOrgs = $this->GetUserOrgs($oUser, $sClass);
 		if (count($aUserOrgs) == 0)
 		{
 			// No org means 'any org'