Fix LocalAccessOrRequiresElevationHandler (#9315)

This commit is contained in:
Shadowghost 2023-02-14 20:22:07 +01:00 committed by GitHub
parent 2c0201e921
commit 87b2bc5dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
else
{
context.Fail();
}
return Task.CompletedTask;
}