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

SVN:trunk[4684]
This commit is contained in:
Guillaume Lajarige
2017-04-18 13:51:25 +00:00
parent c9bb27a3ff
commit 9c5b3818eb

View File

@@ -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;
} }