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

Import Invite Error (#1121)

* throw error if user is already invited on import

* added back the single InviteUser OrgService method
This commit is contained in:
Addison Beck
2021-01-30 17:56:37 -05:00
committed by GitHub
parent 3ba832b440
commit 00853bc250
3 changed files with 25 additions and 5 deletions

View File

@ -124,8 +124,8 @@ namespace Bit.Api.Public.Controllers
AccessAll = model.AccessAll.Value,
Collections = associations
};
var userPromise = await _organizationService.InviteUserAsync(_currentContext.OrganizationId.Value, null, model.ExternalId, invite);
var user = userPromise.FirstOrDefault();
var user = await _organizationService.InviteUserAsync(_currentContext.OrganizationId.Value, null,
model.Email, model.Type.Value, model.AccessAll.Value, model.ExternalId, associations);
var response = new MemberResponseModel(user, associations);
return new JsonResult(response);
}