mirror of
https://github.com/bitwarden/browser
synced 2026-01-04 01:23:57 +00:00
Assign ownership to many of the remaining libs/common files. Criteria for ownership: * Files used by a single team, is now owned by that team. * Files related to a domain owned by a team is now owned by that team. * Where ownership is unclear the "lowest level" service takes ownership.
49 lines
1.7 KiB
TypeScript
49 lines
1.7 KiB
TypeScript
import { Component, OnInit } from "@angular/core";
|
|
|
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
|
import { CipherType } from "@bitwarden/common/vault/enums";
|
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
|
import { PasswordRepromptService } from "@bitwarden/vault";
|
|
|
|
import { CipherReportComponent } from "./cipher-report.component";
|
|
|
|
@Component({
|
|
selector: "app-unsecured-websites-report",
|
|
templateUrl: "unsecured-websites-report.component.html",
|
|
})
|
|
export class UnsecuredWebsitesReportComponent extends CipherReportComponent implements OnInit {
|
|
disabled = true;
|
|
|
|
constructor(
|
|
protected cipherService: CipherService,
|
|
protected organizationService: OrganizationService,
|
|
modalService: ModalService,
|
|
passwordRepromptService: PasswordRepromptService
|
|
) {
|
|
super(modalService, passwordRepromptService, organizationService);
|
|
}
|
|
|
|
async ngOnInit() {
|
|
await super.load();
|
|
}
|
|
|
|
async setCiphers() {
|
|
const allCiphers = await this.getAllCiphers();
|
|
const unsecuredCiphers = allCiphers.filter((c) => {
|
|
if (c.type !== CipherType.Login || !c.login.hasUris || c.isDeleted) {
|
|
return false;
|
|
}
|
|
return c.login.uris.some((u) => u.uri != null && u.uri.indexOf("http://") === 0);
|
|
});
|
|
this.ciphers = unsecuredCiphers.filter(
|
|
(c) => (!this.organization && c.edit) || (this.organization && !c.edit)
|
|
);
|
|
}
|
|
|
|
protected getAllCiphers(): Promise<CipherView[]> {
|
|
return this.cipherService.getAllDecrypted();
|
|
}
|
|
}
|