1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

inactive 2fa report for orgs

This commit is contained in:
Kyle Spearrin
2018-12-14 14:22:30 -05:00
parent 392a90c02c
commit 9b7c0288d4
4 changed files with 57 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ export class InactiveTwoFactorReportComponent extends CipherReportComponent impl
services = new Map<string, string>();
cipherDocs = new Map<string, string>();
constructor(private ciphersService: CipherService, componentFactoryResolver: ComponentFactoryResolver,
constructor(protected cipherService: CipherService, componentFactoryResolver: ComponentFactoryResolver,
messagingService: MessagingService, userService: UserService) {
super(componentFactoryResolver, userService, messagingService, true);
}
@@ -40,7 +40,7 @@ export class InactiveTwoFactorReportComponent extends CipherReportComponent impl
await this.load2fa();
} catch { }
if (this.services.size > 0) {
const allCiphers = await this.ciphersService.getAllDecrypted();
const allCiphers = await this.getAllCiphers();
const inactive2faCiphers: CipherView[] = [];
const promises: Array<Promise<void>> = [];
const docs = new Map<string, string>();
@@ -68,6 +68,10 @@ export class InactiveTwoFactorReportComponent extends CipherReportComponent impl
}
}
protected getAllCiphers(): Promise<CipherView[]> {
return this.cipherService.getAllDecrypted();
}
private async load2fa() {
if (this.services.size > 0) {
return;