1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[PM-129] Refactor email forwarding providers to remove filtering for self-hosted (#4963)

* Added model for email forwarder options

* Refactored code base to use model and filter based on the new model
This commit is contained in:
SmithThe4th
2023-03-13 10:00:48 -04:00
committed by GitHub
parent d74504ec72
commit 1666488672
3 changed files with 15 additions and 17 deletions

View File

@@ -41,16 +41,8 @@ export class GeneratorComponent extends BaseGeneratorComponent {
window
);
if (platformUtilsService.isSelfHost()) {
// Cannot use Firefox Relay on self hosted web vaults due to CORS issues with Firefox Relay API
this.forwardOptions.splice(
this.forwardOptions.findIndex((o) => o.value === "firefoxrelay"),
1
);
// Also cannot use Duck Duck Go on self hosted web vaults due to CORS issues
this.forwardOptions.splice(
this.forwardOptions.findIndex((o) => o.value === "duckduckgo"),
1
);
// Allow only valid email forwarders for self host
this.forwardOptions = this.forwardOptions.filter((forwarder) => forwarder.validForSelfHosted);
}
}