mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #8013 from daullmer/parental_password_fix
This commit is contained in:
commit
84a1674f39
@ -282,16 +282,19 @@ namespace Jellyfin.Api.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var success = await _userManager.AuthenticateUser(
|
if (!HttpContext.User.IsInRole(UserRoles.Administrator))
|
||||||
user.Username,
|
|
||||||
request.CurrentPw,
|
|
||||||
request.CurrentPw,
|
|
||||||
HttpContext.GetNormalizedRemoteIp().ToString(),
|
|
||||||
false).ConfigureAwait(false);
|
|
||||||
|
|
||||||
if (success == null)
|
|
||||||
{
|
{
|
||||||
return StatusCode(StatusCodes.Status403Forbidden, "Invalid user or password entered.");
|
var success = await _userManager.AuthenticateUser(
|
||||||
|
user.Username,
|
||||||
|
request.CurrentPw,
|
||||||
|
request.CurrentPw,
|
||||||
|
HttpContext.GetNormalizedRemoteIp().ToString(),
|
||||||
|
false).ConfigureAwait(false);
|
||||||
|
|
||||||
|
if (success == null)
|
||||||
|
{
|
||||||
|
return StatusCode(StatusCodes.Status403Forbidden, "Invalid user or password entered.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await _userManager.ChangePassword(user, request.NewPw).ConfigureAwait(false);
|
await _userManager.ChangePassword(user, request.NewPw).ConfigureAwait(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user