From 48144a7eaea34984d98b5f22e14a73a24348dcd2 Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Tue, 29 Dec 2020 15:42:11 -0600 Subject: [PATCH] Fixed UI bug with cloning item when personal ownership is not allowed (#240) --- src/angular/components/add-edit.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/angular/components/add-edit.component.ts b/src/angular/components/add-edit.component.ts index 09cdf1343b..567dbadb45 100644 --- a/src/angular/components/add-edit.component.ts +++ b/src/angular/components/add-edit.component.ts @@ -209,6 +209,10 @@ export class AddEditComponent implements OnInit { // Adjust Cipher Name if Cloning if (this.cloneMode) { this.cipher.name += ' - ' + this.i18nService.t('clone'); + // If not allowing personal ownership, update cipher's org Id to prompt downstream changes + if (this.cipher.organizationId == null && !this.allowPersonal) { + this.cipher.organizationId = this.organizationId; + } } } else { this.cipher = new CipherView();