浏览代码

Portal: Refactor a security check to remove unnecessary security messages in error.log

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4684 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 8 年之前
父节点
当前提交
26082d918c

+ 1 - 1
datamodels/2.x/itop-portal-base/portal/src/controllers/managebrickcontroller.class.inc.php

@@ -369,7 +369,7 @@ class ManageBrickController extends BrickController
 					if ($sItemAttr === $sMainActionAttrCode)
 					if ($sItemAttr === $sMainActionAttrCode)
 					{
 					{
 						// Checking if we can edit the object
 						// Checking if we can edit the object
-						if (SecurityHelper::IsActionAllowed($oApp, UR_ACTION_MODIFY, $sCurrentClass, $oCurrentRow->GetKey()) && ($oBrick->GetOpeningMode() === ManageBrick::ENUM_ACTION_EDIT))
+						if (($oBrick->GetOpeningMode() === ManageBrick::ENUM_ACTION_EDIT) && SecurityHelper::IsActionAllowed($oApp, UR_ACTION_MODIFY, $sCurrentClass, $oCurrentRow->GetKey()))
 						{
 						{
 							$sActionType = ManageBrick::ENUM_ACTION_EDIT;
 							$sActionType = ManageBrick::ENUM_ACTION_EDIT;
 						}
 						}