password change for user

This commit is contained in:
2021-09-23 10:58:14 +02:00
parent c927a8cce6
commit 8cae995e9b
18 changed files with 275 additions and 103 deletions
+8
View File
@@ -77,6 +77,14 @@ namespace zero.Web.Controllers
}
[ZeroAuthorize]
public async Task<EntityResult<string>> HashPassword([FromBody] UserPasswordEditModel model)
{
BackofficeUser user = await Api.GetUserById(model.UserId);
return await Api.HashPassword(user, model.CurrentPassword, model.NewPassword, model.ConfirmNewPassword);
}
[ZeroAuthorize(Permissions.Settings.Users, PermissionsValue.Update)]
public async Task<EntityResult<BackofficeUser>> Disable([FromBody] BackofficeUser model)
{