mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 19:53:43 +00:00
[PS-1879] Fix Key Connector Migration Flow (#4080)
* Move OrganizationService to fullSync * Add Tech Debt Tracking Link * Remove Commented out code * Add InternalOrganizationService * Use InternalOrganization in services that get to update state
This commit is contained in:
@@ -17,7 +17,7 @@ import { KeyConnectorService as KeyConnectorServiceAbstraction } from "@bitwarde
|
||||
import { LogService as LogServiceAbstraction } from "@bitwarden/common/abstractions/log.service";
|
||||
import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/abstractions/messaging.service";
|
||||
import { NotificationsService as NotificationsServiceAbstraction } from "@bitwarden/common/abstractions/notifications.service";
|
||||
import { OrganizationService as OrganizationServiceAbstraction } from "@bitwarden/common/abstractions/organization/organization.service.abstraction";
|
||||
import { InternalOrganizationService as InternalOrganizationServiceAbstraction } from "@bitwarden/common/abstractions/organization/organization.service.abstraction";
|
||||
import { PasswordGenerationService as PasswordGenerationServiceAbstraction } from "@bitwarden/common/abstractions/passwordGeneration.service";
|
||||
import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/abstractions/platformUtils.service";
|
||||
import { PolicyApiServiceAbstraction } from "@bitwarden/common/abstractions/policy/policy-api.service.abstraction";
|
||||
@@ -153,7 +153,7 @@ export default class MainBackground {
|
||||
popupUtilsService: PopupUtilsService;
|
||||
sendService: SendServiceAbstraction;
|
||||
fileUploadService: FileUploadServiceAbstraction;
|
||||
organizationService: OrganizationServiceAbstraction;
|
||||
organizationService: InternalOrganizationServiceAbstraction;
|
||||
providerService: ProviderServiceAbstraction;
|
||||
keyConnectorService: KeyConnectorServiceAbstraction;
|
||||
userVerificationService: UserVerificationServiceAbstraction;
|
||||
@@ -317,7 +317,7 @@ export default class MainBackground {
|
||||
this.stateService
|
||||
);
|
||||
this.syncNotifierService = new SyncNotifierService();
|
||||
this.organizationService = new OrganizationService(this.stateService, this.syncNotifierService);
|
||||
this.organizationService = new OrganizationService(this.stateService);
|
||||
this.policyService = new PolicyService(this.stateService, this.organizationService);
|
||||
this.policyApiService = new PolicyApiService(
|
||||
this.policyService,
|
||||
@@ -409,7 +409,7 @@ export default class MainBackground {
|
||||
this.stateService,
|
||||
this.providerService,
|
||||
this.folderApiService,
|
||||
this.syncNotifierService,
|
||||
this.organizationService,
|
||||
logoutCallback
|
||||
);
|
||||
this.eventService = new EventService(
|
||||
|
||||
@@ -3,15 +3,10 @@ import { OrganizationService } from "@bitwarden/common/services/organization/org
|
||||
|
||||
import { FactoryOptions, CachedServices, factory } from "./factory-options";
|
||||
import { stateServiceFactory, StateServiceInitOptions } from "./state-service.factory";
|
||||
import {
|
||||
syncNotifierServiceFactory,
|
||||
SyncNotifierServiceInitOptions,
|
||||
} from "./sync-notifier-service.factory";
|
||||
|
||||
type OrganizationServiceFactoryOptions = FactoryOptions;
|
||||
|
||||
export type OrganizationServiceInitOptions = OrganizationServiceFactoryOptions &
|
||||
SyncNotifierServiceInitOptions &
|
||||
StateServiceInitOptions;
|
||||
|
||||
export function organizationServiceFactory(
|
||||
@@ -22,10 +17,6 @@ export function organizationServiceFactory(
|
||||
cache,
|
||||
"organizationService",
|
||||
opts,
|
||||
async () =>
|
||||
new OrganizationService(
|
||||
await stateServiceFactory(cache, opts),
|
||||
await syncNotifierServiceFactory(cache, opts)
|
||||
)
|
||||
async () => new OrganizationService(await stateServiceFactory(cache, opts))
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user