mirror of
https://github.com/bitwarden/server.git
synced 2025-12-10 15:55:10 -06:00
Move premium access query to Billing owned ServiceCollectionExtensions
This commit is contained in:
parent
dbb8619e21
commit
2f11c1384c
@ -9,7 +9,6 @@ using Bit.Core.Auth.UserFeatures.UserMasterPassword;
|
||||
using Bit.Core.Auth.UserFeatures.UserMasterPassword.Interfaces;
|
||||
using Bit.Core.Auth.UserFeatures.WebAuthnLogin;
|
||||
using Bit.Core.Auth.UserFeatures.WebAuthnLogin.Implementations;
|
||||
using Bit.Core.Billing.Premium.Queries;
|
||||
using Bit.Core.KeyManagement.UserKey;
|
||||
using Bit.Core.KeyManagement.UserKey.Implementations;
|
||||
using Bit.Core.Services;
|
||||
@ -28,7 +27,6 @@ public static class UserServiceCollectionExtensions
|
||||
services.AddUserRegistrationCommands();
|
||||
services.AddWebAuthnLoginCommands();
|
||||
services.AddTdeOffboardingPasswordCommands();
|
||||
services.AddPremiumAccessQueries();
|
||||
services.AddTwoFactorQueries();
|
||||
services.AddSsoQueries();
|
||||
}
|
||||
@ -67,11 +65,6 @@ public static class UserServiceCollectionExtensions
|
||||
services.AddScoped<IAssertWebAuthnLoginCredentialCommand, AssertWebAuthnLoginCredentialCommand>();
|
||||
}
|
||||
|
||||
private static void AddPremiumAccessQueries(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IHasPremiumAccessQuery, HasPremiumAccessQuery>();
|
||||
}
|
||||
|
||||
private static void AddTwoFactorQueries(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<ITwoFactorIsEnabledQuery, TwoFactorIsEnabledQuery>();
|
||||
|
||||
@ -6,6 +6,7 @@ using Bit.Core.Billing.Organizations.Queries;
|
||||
using Bit.Core.Billing.Organizations.Services;
|
||||
using Bit.Core.Billing.Payment;
|
||||
using Bit.Core.Billing.Premium.Commands;
|
||||
using Bit.Core.Billing.Premium.Queries;
|
||||
using Bit.Core.Billing.Pricing;
|
||||
using Bit.Core.Billing.Services;
|
||||
using Bit.Core.Billing.Services.Implementations;
|
||||
@ -31,6 +32,7 @@ public static class ServiceCollectionExtensions
|
||||
services.AddPaymentOperations();
|
||||
services.AddOrganizationLicenseCommandsQueries();
|
||||
services.AddPremiumCommands();
|
||||
services.AddPremiumQueries();
|
||||
services.AddTransient<IGetOrganizationMetadataQuery, GetOrganizationMetadataQuery>();
|
||||
services.AddTransient<IGetOrganizationWarningsQuery, GetOrganizationWarningsQuery>();
|
||||
services.AddTransient<IRestartSubscriptionCommand, RestartSubscriptionCommand>();
|
||||
@ -50,4 +52,9 @@ public static class ServiceCollectionExtensions
|
||||
services.AddScoped<ICreatePremiumSelfHostedSubscriptionCommand, CreatePremiumSelfHostedSubscriptionCommand>();
|
||||
services.AddTransient<IPreviewPremiumTaxCommand, PreviewPremiumTaxCommand>();
|
||||
}
|
||||
|
||||
private static void AddPremiumQueries(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IHasPremiumAccessQuery, HasPremiumAccessQuery>();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user