1
0
mirror of https://github.com/bitwarden/server synced 2025-12-15 15:53:59 +00:00

[BEEEP] begin 2fa integration tests for identity (#3843)

* begin 2fa integration tests for identity
- fix org mappings and query

* add key length to doc

* lint
This commit is contained in:
Jake Fink
2024-04-05 09:30:42 -04:00
committed by GitHub
parent 4af7780bb8
commit 108d22f484
4 changed files with 169 additions and 5 deletions

View File

@@ -26,7 +26,20 @@ public class OrganizationMapperProfile : Profile
{
public OrganizationMapperProfile()
{
CreateMap<Core.AdminConsole.Entities.Organization, Organization>().ReverseMap();
CreateMap<Core.AdminConsole.Entities.Organization, Organization>()
.ForMember(org => org.Ciphers, opt => opt.Ignore())
.ForMember(org => org.OrganizationUsers, opt => opt.Ignore())
.ForMember(org => org.Groups, opt => opt.Ignore())
.ForMember(org => org.Policies, opt => opt.Ignore())
.ForMember(org => org.Collections, opt => opt.Ignore())
.ForMember(org => org.SsoConfigs, opt => opt.Ignore())
.ForMember(org => org.SsoUsers, opt => opt.Ignore())
.ForMember(org => org.Transactions, opt => opt.Ignore())
.ForMember(org => org.ApiKeys, opt => opt.Ignore())
.ForMember(org => org.Connections, opt => opt.Ignore())
.ForMember(org => org.Domains, opt => opt.Ignore())
.ReverseMap();
CreateProjection<Organization, SelfHostedOrganizationDetails>()
.ForMember(sd => sd.CollectionCount, opt => opt.MapFrom(o => o.Collections.Count))
.ForMember(sd => sd.GroupCount, opt => opt.MapFrom(o => o.Groups.Count))