Fixed UI bug with cloning item when personal ownership is not allowed (#240)

This commit is contained in:
Vincent Salucci 2020-12-29 15:42:11 -06:00 committed by GitHub
parent 91c61aea58
commit 48144a7eae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -209,6 +209,10 @@ export class AddEditComponent implements OnInit {
// Adjust Cipher Name if Cloning // Adjust Cipher Name if Cloning
if (this.cloneMode) { if (this.cloneMode) {
this.cipher.name += ' - ' + this.i18nService.t('clone'); 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 { } else {
this.cipher = new CipherView(); this.cipher = new CipherView();