mirror of
https://github.com/bitwarden/server
synced 2025-12-10 05:13:48 +00:00
Remove force ef setting
This commit is contained in:
@@ -93,12 +93,12 @@ namespace Bit.SharedWeb.Utilities;
|
||||
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static SupportedDatabaseProviders AddDatabaseRepositories(this IServiceCollection services, GlobalSettings globalSettings, bool forceEf = false)
|
||||
public static SupportedDatabaseProviders AddDatabaseRepositories(this IServiceCollection services, GlobalSettings globalSettings)
|
||||
{
|
||||
var (provider, connectionString) = GetDatabaseProvider(globalSettings);
|
||||
services.SetupEntityFramework(connectionString, provider);
|
||||
|
||||
if (provider != SupportedDatabaseProviders.SqlServer && !forceEf)
|
||||
if (provider != SupportedDatabaseProviders.SqlServer)
|
||||
{
|
||||
services.AddPasswordManagerEFRepositories(globalSettings.SelfHosted, globalSettings);
|
||||
}
|
||||
@@ -124,6 +124,7 @@ public static class ServiceCollectionExtensions
|
||||
// We need the http context accessor to use the Singleton version, which pulls from the scoped version
|
||||
services.AddHttpContextAccessor();
|
||||
|
||||
services.AddSingleton<IPlayDataService, PlayDataService>();
|
||||
services.AddSingleton<IPlayIdService, PlayIdSingletonService>();
|
||||
services.AddScoped<PlayIdService>();
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ var globalSettings = builder.Services.AddGlobalSettingsServices(builder.Configur
|
||||
// Common services
|
||||
builder.Services.AddCustomDataProtectionServices(builder.Environment, globalSettings);
|
||||
builder.Services.AddTokenizers();
|
||||
builder.Services.AddDatabaseRepositories(globalSettings, forceEf: true);
|
||||
builder.Services.AddDatabaseRepositories(globalSettings);
|
||||
|
||||
builder.Services.AddScoped<Microsoft.AspNetCore.Identity.IPasswordHasher<Bit.Core.Entities.User>, Microsoft.AspNetCore.Identity.PasswordHasher<Bit.Core.Entities.User>>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user