فهرست منبع

Customer portal : Security exception raised when adding contact on a new UserRequest / Incident. This was caused by a bug in the SecurityHelper while checking scopes for a class that had no objects yet. (R-011452)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4249 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 9 سال پیش
والد
کامیت
62d9c35886
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      datamodels/2.x/itop-portal-base/portal/src/helpers/securityhelper.class.inc.php

+ 3 - 1
datamodels/2.x/itop-portal-base/portal/src/helpers/securityhelper.class.inc.php

@@ -98,7 +98,9 @@ class SecurityHelper
 
 			// - Checking if query result is null
 			$oSet = new DBObjectSet($oScopeQuery);
-			if ($oSet->Count() === 0)
+			// Note : This is to address a bug (#R-011452). We creating an object that is the first of its class, this would failed as the scope query always return an empty set
+			//if ($oSet->Count() === 0)
+			if (($oSet->Count() === 0) && ($sObjectId !== null))
 			{
 				if ($oApp['debug'])
 				{