Skip to content

Commit

Permalink
remove vNext notation for OrganizationService and related
Browse files Browse the repository at this point in the history
  • Loading branch information
BTreston committed Jan 15, 2025
1 parent 57ad18f commit c8e6d4c
Show file tree
Hide file tree
Showing 173 changed files with 448 additions and 450 deletions.
8 changes: 4 additions & 4 deletions apps/browser/src/background/main.background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import { EventUploadService as EventUploadServiceAbstraction } from "@bitwarden/
import { NotificationsService as NotificationsServiceAbstraction } from "@bitwarden/common/abstractions/notifications.service";
import { SearchService as SearchServiceAbstraction } from "@bitwarden/common/abstractions/search.service";
import { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service";
import { vNextInternalOrganizationServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { InternalOrganizationServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction";
import { InternalPolicyService as InternalPolicyServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { ProviderService as ProviderServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/provider.service";
import { DefaultvNextOrganizationService } from "@bitwarden/common/admin-console/services/organization/default-vnext-organization.service";
import { DefaultOrganizationService } from "@bitwarden/common/admin-console/services/organization/default-organization.service";
import { PolicyApiService } from "@bitwarden/common/admin-console/services/policy/policy-api.service";
import { PolicyService } from "@bitwarden/common/admin-console/services/policy/policy.service";
import { ProviderService } from "@bitwarden/common/admin-console/services/provider.service";
Expand Down Expand Up @@ -328,7 +328,7 @@ export default class MainBackground {
sendStateProvider: SendStateProvider;
fileUploadService: FileUploadServiceAbstraction;
cipherFileUploadService: CipherFileUploadServiceAbstraction;
organizationService: vNextInternalOrganizationServiceAbstraction;
organizationService: InternalOrganizationServiceAbstraction;
providerService: ProviderServiceAbstraction;
keyConnectorService: KeyConnectorServiceAbstraction;
userVerificationService: UserVerificationServiceAbstraction;
Expand Down Expand Up @@ -668,7 +668,7 @@ export default class MainBackground {
this.appIdService = new AppIdService(this.storageService, this.logService);

this.userDecryptionOptionsService = new UserDecryptionOptionsService(this.stateProvider);
this.organizationService = new DefaultvNextOrganizationService(this.stateProvider);
this.organizationService = new DefaultOrganizationService(this.stateProvider);
this.policyService = new PolicyService(this.stateProvider, this.organizationService);

this.vaultTimeoutSettingsService = new VaultTimeoutSettingsService(
Expand Down
4 changes: 2 additions & 2 deletions apps/browser/src/popup/services/services.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { EventCollectionService as EventCollectionServiceAbstraction } from "@bitwarden/common/abstractions/event/event-collection.service";
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout.service";
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { DefaultvNextOrganizationService } from "@bitwarden/common/admin-console/services/organization/default-vnext-organization.service";
import { DefaultOrganizationService } from "@bitwarden/common/admin-console/services/organization/default-organization.service";
import {
AccountService,
AccountService as AccountServiceAbstraction,
Expand Down Expand Up @@ -376,7 +376,7 @@ const safeProviders: SafeProvider[] = [
provide: VaultFilterService,
useClass: VaultFilterService,
deps: [
DefaultvNextOrganizationService,
DefaultOrganizationService,
FolderServiceAbstraction,
CipherService,
CollectionService,
Expand Down
8 changes: 4 additions & 4 deletions apps/browser/src/services/families-policy.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from "@angular/core/testing";
import { mock, MockProxy } from "jest-mock-extended";
import { firstValueFrom, of } from "rxjs";

import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { Policy } from "@bitwarden/common/admin-console/models/domain/policy";
Expand All @@ -15,20 +15,20 @@ import { FamiliesPolicyService } from "./families-policy.service"; // Adjust the

describe("FamiliesPolicyService", () => {
let service: FamiliesPolicyService;
let organizationService: MockProxy<vNextOrganizationService>;
let organizationService: MockProxy<OrganizationService>;
let policyService: MockProxy<PolicyService>;
let accountService: FakeAccountService;
const userId = Utils.newGuid() as UserId;

beforeEach(() => {
organizationService = mock<vNextOrganizationService>();
organizationService = mock<OrganizationService>();
policyService = mock<PolicyService>();
accountService = mockAccountServiceWith(userId);

TestBed.configureTestingModule({
providers: [
FamiliesPolicyService,
{ provide: vNextOrganizationService, useValue: organizationService },
{ provide: OrganizationService, useValue: organizationService },
{ provide: PolicyService, useValue: policyService },
{ provide: AccountService, useValue: accountService },
],
Expand Down
4 changes: 2 additions & 2 deletions apps/browser/src/services/families-policy.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from "@angular/core";
import { map, Observable, of, switchMap } from "rxjs";

import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { PolicyType } from "@bitwarden/common/admin-console/enums";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
Expand All @@ -11,7 +11,7 @@ import { getUserId } from "@bitwarden/common/auth/services/account.service";
export class FamiliesPolicyService {
constructor(
private policyService: PolicyService,
private organizationService: vNextOrganizationService,
private organizationService: OrganizationService,
private accountService: AccountService,
) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RouterModule } from "@angular/router";
import { Observable, firstValueFrom, switchMap } from "rxjs";

import { JslibModule } from "@bitwarden/angular/jslib.module";
import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { getUserId } from "@bitwarden/common/auth/services/account.service";
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service";
Expand Down Expand Up @@ -40,7 +40,7 @@ export class MoreFromBitwardenPageV2Component {
private dialogService: DialogService,
billingAccountProfileStateService: BillingAccountProfileStateService,
private environmentService: EnvironmentService,
private organizationService: vNextOrganizationService,
private organizationService: OrganizationService,
private accountService: AccountService,
private familiesPolicyService: FamiliesPolicyService,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Router } from "@angular/router";
import { RouterTestingModule } from "@angular/router/testing";
import { BehaviorSubject, of } from "rxjs";

import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions";
Expand Down Expand Up @@ -81,7 +81,7 @@ describe("OpenAttachmentsComponent", () => {
useValue: { showToast },
},
{
provide: vNextOrganizationService,
provide: OrganizationService,
useValue: { organizations$ },
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { firstValueFrom, map } from "rxjs";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import {
getOrganizationById,
vNextOrganizationService,
} from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
OrganizationService,
} from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { getUserId } from "@bitwarden/common/auth/services/account.service";
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions";
Expand Down Expand Up @@ -52,7 +52,7 @@ export class OpenAttachmentsComponent implements OnInit {
private router: Router,
private billingAccountProfileStateService: BillingAccountProfileStateService,
private cipherService: CipherService,
private organizationService: vNextOrganizationService,
private organizationService: OrganizationService,
private toastService: ToastService,
private i18nService: I18nService,
private filePopoutUtilsService: FilePopoutUtilsService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BehaviorSubject, firstValueFrom, map, switchMap } from "rxjs";
import { filter } from "rxjs/operators";

import { JslibModule } from "@bitwarden/angular/jslib.module";
import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { getUserId } from "@bitwarden/common/auth/services/account.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
Expand Down Expand Up @@ -84,7 +84,7 @@ export class ItemMoreOptionsComponent implements OnInit {
private i18nService: I18nService,
private vaultPopupAutofillService: VaultPopupAutofillService,
private accountService: AccountService,
private organizationService: vNextOrganizationService,
private organizationService: OrganizationService,
private cipherAuthorizationService: CipherAuthorizationService,
) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BehaviorSubject, Subject } from "rxjs";

import { CollectionService } from "@bitwarden/admin-console/common";
import { SearchService } from "@bitwarden/common/abstractions/search.service";
import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
Expand Down Expand Up @@ -63,7 +63,7 @@ describe("VaultHeaderV2Component", () => {
},
{ provide: VaultSettingsService, useValue: mock<VaultSettingsService>() },
{ provide: FolderService, useValue: mock<FolderService>() },
{ provide: vNextOrganizationService, useValue: mock<vNextOrganizationService>() },
{ provide: OrganizationService, useValue: mock<OrganizationService>() },
{ provide: CollectionService, useValue: mock<CollectionService>() },
{ provide: PolicyService, useValue: mock<PolicyService>() },
{ provide: SearchService, useValue: mock<SearchService>() },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { CollectionService } from "@bitwarden/admin-console/common";
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component";
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { AutofillSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/autofill-settings.service";
Expand Down Expand Up @@ -66,7 +66,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
eventCollectionService: EventCollectionService,
policyService: PolicyService,
private popupCloseWarningService: PopupCloseWarningService,
organizationService: vNextOrganizationService,
organizationService: OrganizationService,
passwordRepromptService: PasswordRepromptService,
logService: LogService,
dialogService: DialogService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { first } from "rxjs/operators";

import { CollectionService } from "@bitwarden/admin-console/common";
import { CollectionsComponent as BaseCollectionsComponent } from "@bitwarden/angular/admin-console/components/collections.component";
import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
Expand All @@ -24,7 +24,7 @@ export class CollectionsComponent extends BaseCollectionsComponent implements On
platformUtilsService: PlatformUtilsService,
i18nService: I18nService,
cipherService: CipherService,
organizationService: vNextOrganizationService,
organizationService: OrganizationService,
private route: ActivatedRoute,
private location: Location,
logService: LogService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Subject, firstValueFrom, from, Subscription } from "rxjs";
import { debounceTime, switchMap, takeUntil } from "rxjs/operators";

import { SearchService } from "@bitwarden/common/abstractions/search.service";
import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { getUserId } from "@bitwarden/common/auth/services/account.service";
import { AutofillOverlayVisibility } from "@bitwarden/common/autofill/constants";
Expand Down Expand Up @@ -72,7 +72,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
private searchService: SearchService,
private autofillSettingsService: AutofillSettingsServiceAbstraction,
private passwordRepromptService: PasswordRepromptService,
private organizationService: vNextOrganizationService,
private organizationService: OrganizationService,
private accountService: AccountService,
private vaultFilterService: VaultFilterService,
private vaultSettingsService: VaultSettingsService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { first } from "rxjs/operators";

import { CollectionService } from "@bitwarden/admin-console/common";
import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component";
import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
Expand All @@ -25,7 +25,7 @@ export class ShareComponent extends BaseShareComponent implements OnInit {
cipherService: CipherService,
private route: ActivatedRoute,
private router: Router,
organizationService: vNextOrganizationService,
organizationService: OrganizationService,
accountService: AccountService,
) {
super(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CollectionService, CollectionView } from "@bitwarden/admin-console/comm
import { VaultItemsComponent as BaseVaultItemsComponent } from "@bitwarden/angular/vault/components/vault-items.component";
import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model";
import { SearchService } from "@bitwarden/common/abstractions/search.service";
import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { getUserId } from "@bitwarden/common/auth/services/account.service";
import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service";
Expand Down Expand Up @@ -56,7 +56,7 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn

constructor(
searchService: SearchService,
private organizationService: vNextOrganizationService,
private organizationService: OrganizationService,
private accountService: AccountService,
private route: ActivatedRoute,
private router: Router,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
takeUntil,
} from "rxjs";

import { vNextOrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/vnext.organization.service.abstraction";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { PolicyType } from "@bitwarden/common/admin-console/enums";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
Expand Down Expand Up @@ -103,7 +103,7 @@ export class VaultSelectComponent implements OnInit, OnDestroy {
private overlay: Overlay,
private viewContainerRef: ViewContainerRef,
private platformUtilsService: PlatformUtilsService,
private organizationService: vNextOrganizationService,
private organizationService: OrganizationService,
private accountService: AccountService,
private policyService: PolicyService,
) {}
Expand Down
Loading

0 comments on commit c8e6d4c

Please sign in to comment.