1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +00:00

exposed passwords report for orgs

This commit is contained in:
Kyle Spearrin
2018-12-14 13:56:01 -05:00
parent 7a58f6d967
commit 392a90c02c
13 changed files with 139 additions and 35 deletions

View File

@@ -45,21 +45,7 @@ export class CiphersComponent extends BaseCiphersComponent {
return;
}
this.accessEvents = this.organization.useEvents;
const ciphers = await this.apiService.getCiphersOrganization(this.organization.id);
if (ciphers != null && ciphers.data != null && ciphers.data.length) {
const decCiphers: CipherView[] = [];
const promises: any[] = [];
ciphers.data.forEach((r) => {
const data = new CipherData(r);
const cipher = new Cipher(data);
promises.push(cipher.decrypt().then((c) => decCiphers.push(c)));
});
await Promise.all(promises);
decCiphers.sort(this.cipherService.getLocaleSortingFunction());
this.allCiphers = decCiphers;
} else {
this.allCiphers = [];
}
this.allCiphers = await this.cipherService.getAllFromApiForOrganization(this.organization.id);
this.applyFilter(filter);
this.loaded = true;
}