1
0
mirror of https://github.com/bitwarden/server synced 2025-12-18 01:03:17 +00:00

[PM-26377] Correcting Auto Confirm Handler Provider Check (#6681)

* Fixed bug where providers weren't being checked correctly in auto confirm handler.
This commit is contained in:
Jared McCannon
2025-12-05 08:28:42 -06:00
committed by GitHub
parent 80ee31b4fe
commit 18a8829476
8 changed files with 398 additions and 322 deletions

View File

@@ -96,6 +96,20 @@ public class ProviderUserRepository :
return await query.ToArrayAsync();
}
}
public async Task<ICollection<ProviderUser>> GetManyByManyUsersAsync(IEnumerable<Guid> userIds)
{
await using var scope = ServiceScopeFactory.CreateAsyncScope();
var dbContext = GetDatabaseContext(scope);
var query = from pu in dbContext.ProviderUsers
where pu.UserId != null && userIds.Contains(pu.UserId.Value)
select pu;
return await query.ToArrayAsync();
}
public async Task<ProviderUser> GetByProviderUserAsync(Guid providerId, Guid userId)
{
using (var scope = ServiceScopeFactory.CreateScope())