1
0
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:
Justin Baur
2024-07-04 21:14:37 -04:00
committed by GitHub
parent 7da37ee231
commit 8b5f65fc00
22 changed files with 9874 additions and 62 deletions

View File

@ -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>();

View File

@ -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);

View File

@ -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>()