1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-20 00:47:16 -05:00

Separate desktop and CLI for ClientType checks (#5441)

This commit is contained in:
Todd Martin
2025-04-01 10:06:30 -04:00
committed by GitHub
parent 0ca1b319fd
commit 1beb5dc5c0
2 changed files with 9 additions and 2 deletions

View File

@ -16,7 +16,11 @@ public static class DeviceTypes
DeviceType.LinuxDesktop,
DeviceType.MacOsDesktop,
DeviceType.WindowsDesktop,
DeviceType.UWP,
DeviceType.UWP
];
public static IReadOnlyCollection<DeviceType> CliTypes { get; } =
[
DeviceType.WindowsCLI,
DeviceType.MacOsCLI,
DeviceType.LinuxCLI
@ -50,6 +54,7 @@ public static class DeviceTypes
{
not null when MobileTypes.Contains(deviceType.Value) => ClientType.Mobile,
not null when DesktopTypes.Contains(deviceType.Value) => ClientType.Desktop,
not null when CliTypes.Contains(deviceType.Value) => ClientType.Cli,
not null when BrowserExtensionTypes.Contains(deviceType.Value) => ClientType.Browser,
not null when BrowserTypes.Contains(deviceType.Value) => ClientType.Web,
_ => ClientType.All