public OrganizationUserInvite(OrganizationUserInviteRequestModel requestModel) { Emails = requestModel.Emails; Type = requestModel.Type.Value; AccessAll = requestModel.AccessAll; Collections = requestModel.Collections.Select(c => c.ToSelectionReadOnly()); Permissions = requestModel.Permissions; }
public async Task Invite(string orgId, [FromBody] OrganizationUserInviteRequestModel model) { var orgGuidId = new Guid(orgId); if (!_currentContext.ManageUsers(orgGuidId)) { throw new NotFoundException(); } var userId = _userService.GetProperUserId(User); var result = await _organizationService.InviteUserAsync(orgGuidId, userId.Value, null, new OrganizationUserInvite(model)); }
public async Task Invite(string orgId, [FromBody] OrganizationUserInviteRequestModel model) { var orgGuidId = new Guid(orgId); if (!_currentContext.OrganizationAdmin(orgGuidId)) { throw new NotFoundException(); } var userId = _userService.GetProperUserId(User); var result = await _organizationService.InviteUserAsync(orgGuidId, userId.Value, model.Emails, model.Type.Value, model.AccessAll, null, model.Collections?.Select(c => c.ToSelectionReadOnly())); }
public async Task Invite(string orgId, [FromBody] OrganizationUserInviteRequestModel model) { var userId = _userService.GetProperUserId(User); var result = await _organizationService.InviteUserAsync(new Guid(orgId), userId.Value, model.Email, model.Type.Value, model.Subvaults?.Select(s => s.ToSubvaultUser())); }
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); }