mirror of
https://github.com/bitwarden/server.git
synced 2025-07-08 03:15:07 -05:00
[PM-5424] fix TDE provider user (#3771)
* Add Test Asserting Problem * Fix Test --------- Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
This commit is contained in:
@ -489,6 +489,10 @@ public class CurrentContext : ICurrentContext
|
||||
{
|
||||
if (Organizations == null)
|
||||
{
|
||||
// If we haven't had our user id set, take the one passed in since we are about to get information
|
||||
// for them anyways.
|
||||
UserId ??= userId;
|
||||
|
||||
var userOrgs = await organizationUserRepository.GetManyDetailsByUserAsync(userId);
|
||||
Organizations = userOrgs.Where(ou => ou.Status == OrganizationUserStatusType.Confirmed)
|
||||
.Select(ou => new CurrentContextOrganization(ou)).ToList();
|
||||
@ -501,6 +505,10 @@ public class CurrentContext : ICurrentContext
|
||||
{
|
||||
if (Providers == null)
|
||||
{
|
||||
// If we haven't had our user id set, take the one passed in since we are about to get information
|
||||
// for them anyways.
|
||||
UserId ??= userId;
|
||||
|
||||
var userProviders = await providerUserRepository.GetManyByUserAsync(userId);
|
||||
Providers = userProviders.Where(ou => ou.Status == ProviderUserStatusType.Confirmed)
|
||||
.Select(ou => new CurrentContextProvider(ou)).ToList();
|
||||
|
Reference in New Issue
Block a user