mirror of
https://github.com/bitwarden/server
synced 2026-02-28 02:13:19 +00:00
[EC-584] Removed ListResponseModel from OrganizationExportResponseModel (#2316)
* [EC-584] Removed ListResponseModel from OrganizationExportResponseModel properties
* [EC-584] Added backwards compatibility for client version 2022.9.0
* [EC-584] Added property 'ClientVersion' to ICurrentContext
* [EC-584] Added backwards compatibility for version 2022.10.0
* [EC-584] Change ICurrentContext.ClientVersion from string to Version
* [EC-584] Remove check for versions before 2022.9.0 because they do not use this endpoint
(cherry picked from commit 8a6f780d55)
This commit is contained in:
@@ -32,6 +32,7 @@ public class CurrentContext : ICurrentContext
|
||||
public virtual bool MaybeBot { get; set; }
|
||||
public virtual int? BotScore { get; set; }
|
||||
public virtual string ClientId { get; set; }
|
||||
public virtual Version ClientVersion { get; set; }
|
||||
|
||||
public CurrentContext(IProviderUserRepository providerUserRepository)
|
||||
{
|
||||
@@ -80,6 +81,11 @@ public class CurrentContext : ICurrentContext
|
||||
{
|
||||
MaybeBot = httpContext.Request.Headers["X-Cf-Maybe-Bot"] == "1";
|
||||
}
|
||||
|
||||
if (httpContext.Request.Headers.ContainsKey("Bitwarden-Client-Version"))
|
||||
{
|
||||
ClientVersion = new Version(httpContext.Request.Headers["Bitwarden-Client-Version"]);
|
||||
}
|
||||
}
|
||||
|
||||
public async virtual Task BuildAsync(ClaimsPrincipal user, GlobalSettings globalSettings)
|
||||
|
||||
Reference in New Issue
Block a user