fix: require current password when admin changes their own password (#9238)

Fixes https://github.com/jellyfin/jellyfin/issues/9208
This commit is contained in:
Claus Vium 2023-02-02 15:25:48 +01:00 committed by GitHub
parent 29c1f54b57
commit e79f5d8226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -277,7 +277,7 @@ namespace Jellyfin.Api.Controllers
}
else
{
if (!User.IsInRole(UserRoles.Administrator))
if (!User.IsInRole(UserRoles.Administrator) || User.GetUserId().Equals(userId))
{
var success = await _userManager.AuthenticateUser(
user.Username,