mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
PM-2944] Make Entities Nullable In Admin Console (#4386)
* Enable `nullable` in `ISubscriber` * Enable `nullable` in `Group` * Enable `nullable` in `GroupUser` * Enable `nullable` in `Organization` * Enable `nullable` in `OrganizationUser` * Enable `nullable` in `Policy` * Enable `nullable` in `Provider` * Enable `nullable` in `ProviderOrganization` * Enable `nullable` in `ProviderUser` * Update Tests * Formatting * Update TwoFactor Tests * Fix Scim Tests * Format * Add Migrations * Format
This commit is contained in:
@ -563,7 +563,9 @@ public class IdentityServerSsoTests
|
||||
var organization = await organizationRepository.CreateAsync(new Organization
|
||||
{
|
||||
Name = "Test Org",
|
||||
UsePolicies = true
|
||||
BillingEmail = "billing-email@example.com",
|
||||
Plan = "Enterprise",
|
||||
UsePolicies = true,
|
||||
});
|
||||
|
||||
var organizationUserRepository = factory.Services.GetRequiredService<IOrganizationUserRepository>();
|
||||
|
@ -607,7 +607,16 @@ public class IdentityServerTests : IClassFixture<IdentityApplicationFactory>
|
||||
var organizationUserRepository = _factory.Services.GetService<IOrganizationUserRepository>();
|
||||
var policyRepository = _factory.Services.GetService<IPolicyRepository>();
|
||||
|
||||
var organization = new Organization { Id = organizationId, Enabled = true, UseSso = ssoPolicyEnabled, UsePolicies = true };
|
||||
var organization = new Organization
|
||||
{
|
||||
Id = organizationId,
|
||||
Name = $"Org Name | {organizationId}",
|
||||
Enabled = true,
|
||||
UseSso = ssoPolicyEnabled,
|
||||
Plan = "Enterprise",
|
||||
UsePolicies = true,
|
||||
BillingEmail = $"billing-email+{organizationId}@example.com",
|
||||
};
|
||||
await organizationRepository.CreateAsync(organization);
|
||||
|
||||
var user = await userRepository.GetByEmailAsync(username);
|
||||
|
@ -78,6 +78,8 @@ public class IdentityServerTwoFactorTests : IClassFixture<IdentityApplicationFac
|
||||
Name = "Test Org",
|
||||
Use2fa = true,
|
||||
TwoFactorProviders = orgTwoFactor,
|
||||
BillingEmail = "billing-email@example.com",
|
||||
Plan = "Enterprise",
|
||||
});
|
||||
|
||||
await _factory.Services.GetService<IOrganizationUserRepository>()
|
||||
|
Reference in New Issue
Block a user