From 87b2bc5dc4b19f275488178fec25e56e23047fec Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Tue, 14 Feb 2023 20:22:07 +0100 Subject: [PATCH] Fix LocalAccessOrRequiresElevationHandler (#9315) --- .../LocalAccessOrRequiresElevationHandler.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Api/Auth/LocalAccessOrRequiresElevationPolicy/LocalAccessOrRequiresElevationHandler.cs b/Jellyfin.Api/Auth/LocalAccessOrRequiresElevationPolicy/LocalAccessOrRequiresElevationHandler.cs index 0b0877d06..6ed6fc90b 100644 --- a/Jellyfin.Api/Auth/LocalAccessOrRequiresElevationPolicy/LocalAccessOrRequiresElevationHandler.cs +++ b/Jellyfin.Api/Auth/LocalAccessOrRequiresElevationPolicy/LocalAccessOrRequiresElevationHandler.cs @@ -37,14 +37,18 @@ namespace Jellyfin.Api.Auth.LocalAccessOrRequiresElevationPolicy if (ip is null || _networkManager.IsInLocalNetwork(ip)) { context.Succeed(requirement); + + return Task.CompletedTask; } if (context.User.IsInRole(UserRoles.Administrator)) { context.Succeed(requirement); } - - context.Fail(); + else + { + context.Fail(); + } return Task.CompletedTask; }