1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05: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

@ -50,9 +50,10 @@ public class OrganizationRepository : Repository<Core.AdminConsole.Entities.Orga
{
var dbContext = GetDatabaseContext(scope);
var organizations = await GetDbSet(dbContext)
.Select(e => e.OrganizationUsers
.Where(ou => ou.UserId == userId)
.Select(ou => ou.Organization))
.SelectMany(e => e.OrganizationUsers
.Where(ou => ou.UserId == userId))
.Include(ou => ou.Organization)
.Select(ou => ou.Organization)
.ToListAsync();
return Mapper.Map<List<Core.AdminConsole.Entities.Organization>>(organizations);
}