1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

add more org reports

This commit is contained in:
Kyle Spearrin
2018-12-14 14:42:04 -05:00
parent 9b7c0288d4
commit ceca4fbe53
10 changed files with 175 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ import { CipherReportComponent } from './cipher-report.component';
export class ReusedPasswordsReportComponent extends CipherReportComponent implements OnInit {
passwordUseMap: Map<string, number>;
constructor(private ciphersService: CipherService, componentFactoryResolver: ComponentFactoryResolver,
constructor(protected cipherService: CipherService, componentFactoryResolver: ComponentFactoryResolver,
messagingService: MessagingService, userService: UserService) {
super(componentFactoryResolver, userService, messagingService, true);
}
@@ -33,7 +33,7 @@ export class ReusedPasswordsReportComponent extends CipherReportComponent implem
}
async setCiphers() {
const allCiphers = await this.ciphersService.getAllDecrypted();
const allCiphers = await this.getAllCiphers();
const ciphersWithPasswords: CipherView[] = [];
this.passwordUseMap = new Map<string, number>();
allCiphers.forEach((c) => {
@@ -51,4 +51,8 @@ export class ReusedPasswordsReportComponent extends CipherReportComponent implem
this.passwordUseMap.has(c.login.password) && this.passwordUseMap.get(c.login.password) > 1);
this.ciphers = reusedPasswordCiphers;
}
protected getAllCiphers(): Promise<CipherView[]> {
return this.cipherService.getAllDecrypted();
}
}