1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

[Reset Password] Enrollment API, Service, and Model updates (#1245)

* [Reset Password] Enrollment API, Service and Model updates

* Added conditional check for calling User's ID
This commit is contained in:
Vincent Salucci
2021-03-30 09:48:52 -05:00
committed by GitHub
parent 339292f536
commit 296e3d881d
9 changed files with 40 additions and 0 deletions

View File

@ -180,6 +180,13 @@ namespace Bit.Api.Controllers
var loggedInUserId = _userService.GetProperUserId(User);
await _organizationService.UpdateUserGroupsAsync(organizationUser, model.GroupIds.Select(g => new Guid(g)), loggedInUserId);
}
[HttpPut("{userId}/reset-password-enrollment")]
public async Task PutResetPasswordEnrollment(string orgId, string userId, [FromBody]OrganizationUserResetPasswordEnrollmentRequestModel model)
{
var callingUserId = _userService.GetProperUserId(User);
await _organizationService.UpdateUserResetPasswordEnrollmentAsync(new Guid(orgId), new Guid(userId), model.ResetPasswordKey, callingUserId);
}
[HttpDelete("{id}")]
[HttpPost("{id}/delete")]