From c946f01b5fbe5b84b928ae8dd4ad54a15dd1803d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 19 Oct 2018 12:18:53 -0400 Subject: [PATCH] set organizationUseTotp on organizationChanged --- src/angular/components/add-edit.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/angular/components/add-edit.component.ts b/src/angular/components/add-edit.component.ts index c7e6c7cf869..3da4a5ec966 100644 --- a/src/angular/components/add-edit.component.ts +++ b/src/angular/components/add-edit.component.ts @@ -313,12 +313,16 @@ export class AddEditComponent implements OnInit { u.showOptions = u.showOptions == null ? true : u.showOptions; } - organizationChanged() { + async organizationChanged() { if (this.writeableCollections != null) { this.writeableCollections.forEach((c) => (c as any).checked = false); } if (this.cipher.organizationId != null) { this.collections = this.writeableCollections.filter((c) => c.organizationId === this.cipher.organizationId); + const org = await this.userService.getOrganization(this.cipher.organizationId); + if (org != null) { + this.cipher.organizationUseTotp = org.useTotp; + } } else { this.collections = []; }