mirror of
https://github.com/bitwarden/server
synced 2025-12-17 08:43:27 +00:00
PM-11123: Device Type mapping (#4768)
* PM-11123: Device Type mapping * PM-11123: Moving ClientType out of NotificationCenter, naming clash with Identity ClientType * PM-11123: Rename ClientType in ICurrentContext to match the type
This commit is contained in:
@@ -39,7 +39,7 @@ public class CurrentContext : ICurrentContext
|
||||
public virtual int? BotScore { get; set; }
|
||||
public virtual string ClientId { get; set; }
|
||||
public virtual Version ClientVersion { get; set; }
|
||||
public virtual ClientType ClientType { get; set; }
|
||||
public virtual IdentityClientType IdentityClientType { get; set; }
|
||||
public virtual Guid? ServiceAccountOrganizationId { get; set; }
|
||||
|
||||
public CurrentContext(
|
||||
@@ -151,11 +151,11 @@ public class CurrentContext : ICurrentContext
|
||||
var clientType = GetClaimValue(claimsDict, Claims.Type);
|
||||
if (clientType != null)
|
||||
{
|
||||
Enum.TryParse(clientType, out ClientType c);
|
||||
ClientType = c;
|
||||
Enum.TryParse(clientType, out IdentityClientType c);
|
||||
IdentityClientType = c;
|
||||
}
|
||||
|
||||
if (ClientType == ClientType.ServiceAccount)
|
||||
if (IdentityClientType == IdentityClientType.ServiceAccount)
|
||||
{
|
||||
ServiceAccountOrganizationId = new Guid(GetClaimValue(claimsDict, Claims.Organization));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user