mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-08 23:00:51 +02:00
Backport pull request #8013 from jellyfin/release-10.8.z
Fix password change during parental control schedule
Authored-by: David Ullmer <davidullmer@outlook.de>
Merged-by: Bond-009 <bond.009@outlook.com>
Original-merge: 84a1674f39
This commit is contained in:
parent
81e164ebc8
commit
b7206b4816
|
@ -281,6 +281,8 @@ namespace Jellyfin.Api.Controllers
|
|||
await _userManager.ResetPassword(user).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!HttpContext.User.IsInRole(UserRoles.Administrator))
|
||||
{
|
||||
var success = await _userManager.AuthenticateUser(
|
||||
user.Username,
|
||||
|
@ -293,6 +295,7 @@ namespace Jellyfin.Api.Controllers
|
|||
{
|
||||
return StatusCode(StatusCodes.Status403Forbidden, "Invalid user or password entered.");
|
||||
}
|
||||
}
|
||||
|
||||
await _userManager.ChangePassword(user, request.NewPw).ConfigureAwait(false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue