1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

[PM-1349] Update client service to retrieve feature flags from API (#5064)

* [PM-1351] Add property to server-config.response. Change config to be able to fetch without being authed.

* [PM-1351] fetch every hour.

* [PM-1351] fetch on vault sync.

* [PM-1351] browser desktop fetch configs on sync complete.

* [PM-1351] Add methods to retrieve feature flags

* [PM-1351] Add enum to use as key to get values feature flag values

* [PM-1351] Remove debug code

* [PM-1351] Get flags when unauthed. Add enums as params. Hourly always fetch.

* [PM-1351] add check for authed user using auth service

* [PM-1351] remove unnecessary timer on account unlock
This commit is contained in:
André Bispo
2023-04-26 15:30:39 +01:00
committed by GitHub
parent dfe69f77f5
commit cfc380c697
12 changed files with 95 additions and 35 deletions

View File

@@ -8,6 +8,7 @@ import { Subject, takeUntil } from "rxjs";
import Swal from "sweetalert2";
import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service";
import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction";
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service";
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
@@ -77,7 +78,8 @@ export class AppComponent implements OnDestroy, OnInit {
private eventUploadService: EventUploadService,
private policyService: InternalPolicyService,
protected policyListService: PolicyListService,
private keyConnectorService: KeyConnectorService
private keyConnectorService: KeyConnectorService,
private configService: ConfigServiceAbstraction
) {}
ngOnInit() {
@@ -127,6 +129,7 @@ export class AppComponent implements OnDestroy, OnInit {
case "syncStarted":
break;
case "syncCompleted":
await this.configService.fetchServerConfig();
break;
case "upgradeOrganization": {
const upgradeConfirmed = await this.platformUtilsService.showDialog(