Skip to content

Commit 2b6cb1f

Browse files
[PM-25501] Register NoopBusinessUnitConverter in OSS DI container
1 parent 0cba609 commit 2b6cb1f

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using Bit.Core.AdminConsole.Entities;
2+
using OneOf;
3+
4+
namespace Bit.Core.Billing.Providers.Services.NoopImplementations;
5+
6+
public class NoopBusinessUnitConverter : IBusinessUnitConverter
7+
{
8+
public Task<Guid> FinalizeConversion(
9+
Organization organization,
10+
Guid userId,
11+
string token,
12+
string providerKey,
13+
string organizationKey) => throw new NotImplementedException();
14+
15+
public Task<OneOf<Guid, List<string>>> InitiateConversion(Organization organization, string providerAdminEmail) => throw new NotImplementedException();
16+
17+
public Task ResendConversionInvite(Organization organization, string providerAdminEmail) => throw new NotImplementedException();
18+
19+
public Task ResetConversion(Organization organization, string providerAdminEmail) => throw new NotImplementedException();
20+
}

src/SharedWeb/Utilities/ServiceCollectionExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
using Bit.Core.Auth.UserFeatures;
2424
using Bit.Core.Auth.UserFeatures.EmergencyAccess;
2525
using Bit.Core.Auth.UserFeatures.PasswordValidation;
26+
using Bit.Core.Billing.Providers.Services;
27+
using Bit.Core.Billing.Providers.Services.NoopImplementations;
2628
using Bit.Core.Billing.Services;
2729
using Bit.Core.Billing.Services.Implementations;
2830
using Bit.Core.Billing.TrialInitiation;
@@ -370,6 +372,7 @@ public static void AddOosServices(this IServiceCollection services)
370372
services.AddScoped<ISecretRepository, NoopSecretRepository>();
371373
services.AddScoped<ISecretVersionRepository, NoopSecretVersionRepository>();
372374
services.AddScoped<IProjectRepository, NoopProjectRepository>();
375+
services.AddTransient<IBusinessUnitConverter, NoopBusinessUnitConverter>();
373376
}
374377

375378
public static void AddNoopServices(this IServiceCollection services)

0 commit comments

Comments
 (0)