mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
[AC-2249] Remove StateService from PolicyApiService (#8106)
This was unused.
This commit is contained in:
parent
f95ff93a71
commit
ad21a1d160
@ -492,11 +492,7 @@ export default class MainBackground {
|
|||||||
this.policyService,
|
this.policyService,
|
||||||
);
|
);
|
||||||
this.badgeSettingsService = new BadgeSettingsService(this.stateProvider);
|
this.badgeSettingsService = new BadgeSettingsService(this.stateProvider);
|
||||||
this.policyApiService = new PolicyApiService(
|
this.policyApiService = new PolicyApiService(this.policyService, this.apiService);
|
||||||
this.policyService,
|
|
||||||
this.apiService,
|
|
||||||
this.stateService,
|
|
||||||
);
|
|
||||||
this.keyConnectorService = new KeyConnectorService(
|
this.keyConnectorService = new KeyConnectorService(
|
||||||
this.stateService,
|
this.stateService,
|
||||||
this.cryptoService,
|
this.cryptoService,
|
||||||
|
@ -24,13 +24,8 @@ import { SettingsService } from "@bitwarden/common/abstractions/settings.service
|
|||||||
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service";
|
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service";
|
||||||
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout.service";
|
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout.service";
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
import {
|
|
||||||
InternalPolicyService,
|
|
||||||
PolicyService,
|
|
||||||
} from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
|
||||||
import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service";
|
import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service";
|
||||||
import { PolicyApiService } from "@bitwarden/common/admin-console/services/policy/policy-api.service";
|
|
||||||
import { AccountService as AccountServiceAbstraction } from "@bitwarden/common/auth/abstractions/account.service";
|
import { AccountService as AccountServiceAbstraction } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
import { AuthService as AuthServiceAbstraction } from "@bitwarden/common/auth/abstractions/auth.service";
|
import { AuthService as AuthServiceAbstraction } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
import { DeviceTrustCryptoServiceAbstraction } from "@bitwarden/common/auth/abstractions/device-trust-crypto.service.abstraction";
|
import { DeviceTrustCryptoServiceAbstraction } from "@bitwarden/common/auth/abstractions/device-trust-crypto.service.abstraction";
|
||||||
@ -312,17 +307,6 @@ function getBgService<T>(service: keyof MainBackground) {
|
|||||||
},
|
},
|
||||||
deps: [StateServiceAbstraction, StateProvider, OrganizationService],
|
deps: [StateServiceAbstraction, StateProvider, OrganizationService],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
provide: PolicyApiServiceAbstraction,
|
|
||||||
useFactory: (
|
|
||||||
policyService: InternalPolicyService,
|
|
||||||
apiService: ApiService,
|
|
||||||
stateService: StateService,
|
|
||||||
) => {
|
|
||||||
return new PolicyApiService(policyService, apiService, stateService);
|
|
||||||
},
|
|
||||||
deps: [InternalPolicyService, ApiService, StateService],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
provide: PlatformUtilsService,
|
provide: PlatformUtilsService,
|
||||||
useFactory: getBgService<PlatformUtilsService>("platformUtilsService"),
|
useFactory: getBgService<PlatformUtilsService>("platformUtilsService"),
|
||||||
|
@ -384,11 +384,7 @@ export class Main {
|
|||||||
this.organizationService,
|
this.organizationService,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.policyApiService = new PolicyApiService(
|
this.policyApiService = new PolicyApiService(this.policyService, this.apiService);
|
||||||
this.policyService,
|
|
||||||
this.apiService,
|
|
||||||
this.stateService,
|
|
||||||
);
|
|
||||||
|
|
||||||
this.keyConnectorService = new KeyConnectorService(
|
this.keyConnectorService = new KeyConnectorService(
|
||||||
this.stateService,
|
this.stateService,
|
||||||
|
@ -684,7 +684,7 @@ import { ModalService } from "./modal.service";
|
|||||||
{
|
{
|
||||||
provide: PolicyApiServiceAbstraction,
|
provide: PolicyApiServiceAbstraction,
|
||||||
useClass: PolicyApiService,
|
useClass: PolicyApiService,
|
||||||
deps: [PolicyServiceAbstraction, ApiServiceAbstraction, StateServiceAbstraction],
|
deps: [InternalPolicyService, ApiServiceAbstraction],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: KeyConnectorServiceAbstraction,
|
provide: KeyConnectorServiceAbstraction,
|
||||||
|
@ -4,7 +4,6 @@ import { ApiService } from "../../../abstractions/api.service";
|
|||||||
import { HttpStatusCode } from "../../../enums";
|
import { HttpStatusCode } from "../../../enums";
|
||||||
import { ErrorResponse } from "../../../models/response/error.response";
|
import { ErrorResponse } from "../../../models/response/error.response";
|
||||||
import { ListResponse } from "../../../models/response/list.response";
|
import { ListResponse } from "../../../models/response/list.response";
|
||||||
import { StateService } from "../../../platform/abstractions/state.service";
|
|
||||||
import { Utils } from "../../../platform/misc/utils";
|
import { Utils } from "../../../platform/misc/utils";
|
||||||
import { PolicyApiServiceAbstraction } from "../../abstractions/policy/policy-api.service.abstraction";
|
import { PolicyApiServiceAbstraction } from "../../abstractions/policy/policy-api.service.abstraction";
|
||||||
import { InternalPolicyService } from "../../abstractions/policy/policy.service.abstraction";
|
import { InternalPolicyService } from "../../abstractions/policy/policy.service.abstraction";
|
||||||
@ -18,7 +17,6 @@ export class PolicyApiService implements PolicyApiServiceAbstraction {
|
|||||||
constructor(
|
constructor(
|
||||||
private policyService: InternalPolicyService,
|
private policyService: InternalPolicyService,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private stateService: StateService,
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async getPolicy(organizationId: string, type: PolicyType): Promise<PolicyResponse> {
|
async getPolicy(organizationId: string, type: PolicyType): Promise<PolicyResponse> {
|
||||||
|
Loading…
Reference in New Issue
Block a user