Use IsInRole

This commit is contained in:
David Ullmer
2022-07-04 19:08:40 +02:00
parent 5f3dbd8294
commit f9d26ea1bc
2 changed files with 1 additions and 13 deletions

View File

@@ -282,7 +282,7 @@ namespace Jellyfin.Api.Controllers
}
else
{
if (await RequestHelpers.IsUserAdministrator(_authContext, HttpContext.Request).ConfigureAwait(false))
if (HttpContext.User.IsInRole(UserRoles.Administrator))
{
var success = await _userManager.AuthenticateUser(
user.Username,