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

manage user type

This commit is contained in:
Kyle Spearrin
2017-03-13 23:31:17 -04:00
parent c8d6a26ec3
commit 7112496ff4
4 changed files with 14 additions and 5 deletions

View File

@ -58,7 +58,7 @@ namespace Bit.Api.Controllers
public async Task Invite(string orgId, [FromBody]OrganizationUserInviteRequestModel model)
{
var user = await _userService.GetUserByPrincipalAsync(User);
var result = await _organizationService.InviteUserAsync(new Guid(orgId), model.Email,
var result = await _organizationService.InviteUserAsync(new Guid(orgId), model.Email, model.Type,
model.Subvaults?.Select(s => s.ToSubvaultUser()));
}
@ -87,7 +87,8 @@ namespace Bit.Api.Controllers
throw new NotFoundException();
}
await _organizationService.SaveUserAsync(organizationUser, model.Subvaults?.Select(s => s.ToSubvaultUser()));
await _organizationService.SaveUserAsync(model.ToOrganizationUser(organizationUser),
model.Subvaults?.Select(s => s.ToSubvaultUser()));
}
[HttpDelete("{id}")]