mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
read collection that are write only
This commit is contained in:
@ -72,15 +72,14 @@ namespace Bit.Api.Controllers
|
||||
}
|
||||
|
||||
[HttpGet("~/collections")]
|
||||
public async Task<ListResponseModel<CollectionResponseModel>> GetUser()
|
||||
public async Task<ListResponseModel<CollectionResponseModel>> GetUser([FromQuery]bool writeOnly = false)
|
||||
{
|
||||
var collections = await _collectionRepository.GetManyByUserIdAsync(_userService.GetProperUserId(User).Value);
|
||||
var collections = await _collectionRepository.GetManyByUserIdAsync(
|
||||
_userService.GetProperUserId(User).Value, writeOnly);
|
||||
var responses = collections.Select(c => new CollectionResponseModel(c));
|
||||
return new ListResponseModel<CollectionResponseModel>(responses);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet("{id}/users")]
|
||||
public async Task<ListResponseModel<CollectionUserResponseModel>> GetUsers(string orgId, string id)
|
||||
{
|
||||
|
Reference in New Issue
Block a user