mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 04:48:27 +01:00
Use ArgumentException.ThrowIfNullOrEmpty
This commit is contained in:
@@ -222,11 +222,7 @@ namespace Jellyfin.Server.Implementations.Devices
|
||||
public bool CanAccessDevice(User user, string deviceId)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(user);
|
||||
|
||||
if (string.IsNullOrEmpty(deviceId))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(deviceId));
|
||||
}
|
||||
ArgumentException.ThrowIfNullOrEmpty(deviceId);
|
||||
|
||||
if (user.HasPermission(PermissionKind.EnableAllDevices) || user.HasPermission(PermissionKind.IsAdministrator))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user