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

Fix org manager check on export (#1906)

* Fix org manager check on export

* Fix filter typo from collection to cipher
This commit is contained in:
Chad Scharf
2022-03-14 15:34:22 -04:00
committed by GitHub
parent 72baf6deab
commit 76ddcfa2dc
2 changed files with 11 additions and 5 deletions

View File

@ -87,8 +87,9 @@ namespace Bit.Api.Controllers
throw new NotFoundException();
}
var collections = await _collectionRepository.GetManyByOrganizationIdAsync(orgIdGuid);
var responses = collections.Select(c => new CollectionResponseModel(c));
var collections = await _collectionRepository.GetManyByUserIdAsync(_currentContext.UserId.Value);
var orgCollections = collections.Where(c => c.OrganizationId == orgIdGuid);
var responses = orgCollections.Select(c => new CollectionResponseModel(c));
return new ListResponseModel<CollectionResponseModel>(responses);
}