mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
[Provider] Prevent including pending organizations in SyncResponse (#1482)
This commit is contained in:
@ -14,5 +14,6 @@ namespace Bit.Core.Models.Data
|
||||
public bool Enabled { get; set; }
|
||||
public string Permissions { get; set; }
|
||||
public bool UseEvents { get; set; }
|
||||
public ProviderStatusType ProviderStatus { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ namespace Bit.Core.Repositories.EntityFramework.Queries
|
||||
join p in dbContext.Providers
|
||||
on pu.ProviderId equals p.Id into p_g
|
||||
from p in p_g.DefaultIfEmpty()
|
||||
where pu.UserId == _userId && (_status == null || pu.Status == _status)
|
||||
where pu.UserId == _userId && p.Status != ProviderStatusType.Pending && (_status == null || pu.Status == _status)
|
||||
select new { pu, p };
|
||||
return query.Select(x => new ProviderUserProviderDetails()
|
||||
{
|
||||
@ -34,6 +34,7 @@ namespace Bit.Core.Repositories.EntityFramework.Queries
|
||||
Enabled = x.p.Enabled,
|
||||
Permissions = x.pu.Permissions,
|
||||
UseEvents = x.p.UseEvents,
|
||||
ProviderStatus = x.p.Status,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user