mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
Bulk re-invite of org users (#1316)
* Add APIs for Bulk reinvinte * Resolve review comments.
This commit is contained in:
@ -129,6 +129,19 @@ namespace Bit.Api.Controllers
|
||||
var userId = _userService.GetProperUserId(User);
|
||||
var result = await _organizationService.InviteUserAsync(orgGuidId, userId.Value, null, new OrganizationUserInvite(model));
|
||||
}
|
||||
|
||||
[HttpPost("reinvite")]
|
||||
public async Task BulkReinvite(string orgId, [FromBody]OrganizationUserBulkReinviteRequestModel model)
|
||||
{
|
||||
var orgGuidId = new Guid(orgId);
|
||||
if (!_currentContext.ManageUsers(orgGuidId))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
var userId = _userService.GetProperUserId(User);
|
||||
await _organizationService.ResendInvitesAsync(orgGuidId, userId.Value, model.Ids);
|
||||
}
|
||||
|
||||
[HttpPost("{id}/reinvite")]
|
||||
public async Task Reinvite(string orgId, string id)
|
||||
|
Reference in New Issue
Block a user