From a6c77a28987539d061a8f2a378e108f9213ecd20 Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Sun, 25 May 2025 17:05:31 -0400 Subject: [PATCH] Partial rollback of PipelinesTable changes introduced in 54033add10 for CFM-121 --- app/src/Model/Table/PipelinesTable.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/src/Model/Table/PipelinesTable.php b/app/src/Model/Table/PipelinesTable.php index 7a95f9839..0ff4f0550 100644 --- a/app/src/Model/Table/PipelinesTable.php +++ b/app/src/Model/Table/PipelinesTable.php @@ -582,8 +582,7 @@ public function execute( $pipeline, $eis, $eisBackendRecord['source_key'], - $eisBackendRecord['source_record'], - $personId + $eisBackendRecord['source_record'] ); if(!$force && $eisRecord['status'] == 'unchanged') { @@ -762,8 +761,7 @@ protected function manageEISRecord( Pipeline $pipeline, ExternalIdentitySource $eis, string $sourceKey, - ?string $sourceRecord=null, - ?int $personId=null, + ?string $sourceRecord=null ): array { $status = 'unknown'; @@ -798,12 +796,6 @@ protected function manageEISRecord( throw new \InvalidArgumentException(__d('error', 'Pipelines.eis.record.adopted', [$sourceKey, $eisRecord->adopted_person_id])); } - // The Person that initiated the Link does not match the one of the eisRecord found - if($eisRecord->external_identity?->person_id !== $personId) { - $this->llog('rule', "AR-ExternalIdentity-2 Rejecting request to update duplicate/used record for EIS" . $eis->description . " (" . $eis->id . ") source key $sourceKey"); - throw new \InvalidArgumentException(__d('error', 'Pipelines.eis.record.used', [$sourceKey, $eisRecord->external_identity->person_id])); - } - // Update the record as needed, but only if the source record changed. // We consider any aspect of the source record changing to mark the // EIS record as changed, even if it's not material to the attributes