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