mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
import groups and users for org via api
This commit is contained in:
@ -131,7 +131,7 @@ namespace Bit.Api.Controllers
|
||||
}
|
||||
|
||||
[HttpPost("import")]
|
||||
public async Task PostImport([FromBody]ImportRequestModel model)
|
||||
public async Task PostImport([FromBody]ImportPasswordsRequestModel model)
|
||||
{
|
||||
var userId = _userService.GetProperUserId(User).Value;
|
||||
var folders = model.Folders.Select(f => f.ToFolder(userId)).ToList();
|
||||
|
@ -228,5 +228,17 @@ namespace Bit.Api.Controllers
|
||||
await _organizationService.DeleteAsync(organization);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost("{id}/import")]
|
||||
public Task Import(string id, [FromBody]ImportOrganizationUsersRequestModel model)
|
||||
{
|
||||
var orgIdGuid = new Guid(id);
|
||||
if(!_currentContext.OrganizationAdmin(orgIdGuid))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user