Do not upgrade usr_uid to guest when the process is updated.
It will be modified from any other place (webentry UI dialog, endpoint)
This commit is contained in:
davidcallizaya
2017-10-10 11:38:28 -04:00
parent 2a81bba175
commit 951de45cc5
2 changed files with 6 additions and 3 deletions

View File

@@ -796,7 +796,7 @@ class WebEntryEvent
* @return array Return data of the WebEntry-Event updated
* @throws Exception
*/
public function update($webEntryEventUid, $userUidUpdater, array $arrayData)
public function update($webEntryEventUid, $userUidUpdater, array $arrayData, $updateUser = true)
{
try {
//Verify data
@@ -826,7 +826,9 @@ class WebEntryEvent
//Define if the webEntry need to use the guest user
$weUserUid = isset($arrayData["USR_UID"]) ? $arrayData["USR_UID"] : '';
$weAuthentication = isset($arrayData["WE_AUTHENTICATION"]) ? $arrayData["WE_AUTHENTICATION"] : '';
$arrayData["USR_UID"] = $this->getWebEntryUser($weAuthentication, $weUserUid);
if ($updateUser) {
$arrayData["USR_UID"] = $this->getWebEntryUser($weAuthentication, $weUserUid);
}
//Verify data with the required fields
$this->throwExceptionIfDataIsInvalid($webEntryEventUid, $arrayWebEntryEventData["PRJ_UID"], $arrayData);

View File

@@ -2086,7 +2086,8 @@ class BpmnWorkflow extends Project\Bpmn
$arrayResult = $webEntryEvent->update(
$arrayWebEntryEventData['WEE_UID'],
$bpmnProject->getPrjAuthor(),
(!is_null($arrayData))? $arrayData : $arrayWebEntryEventData
(!is_null($arrayData))? $arrayData : $arrayWebEntryEventData,
false
);
}
}