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:
@ -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}")]
|
||||
|
Reference in New Issue
Block a user