1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

[AC-1890] Include collection permission details in PUT/POST response (#3658)

* [Ac-1890] Return CollectionDetailsResponseModel for collection PUT/POST endpoints when a userId is available in the current context

* [AC-1890] Fix broken tests

* [AC-1890] Update to use Organization FC column
This commit is contained in:
Shane Melton
2024-01-24 08:26:37 -08:00
committed by GitHub
parent 243e1de4ee
commit 99762667e9
2 changed files with 29 additions and 2 deletions

View File

@ -49,6 +49,10 @@ public class LegacyCollectionsControllerTests
sutProvider.GetDependency<IOrganizationUserRepository>().GetByOrganizationAsync(orgId, orgUser.UserId.Value)
.Returns(orgUser);
sutProvider.GetDependency<ICollectionRepository>()
.GetByIdAsync(Arg.Any<Guid>(), orgUser.UserId.Value, Arg.Any<bool>())
.Returns(new CollectionDetails());
var collectionRequest = new CollectionRequestModel
{
Name = "encrypted_string",
@ -87,6 +91,10 @@ public class LegacyCollectionsControllerTests
sutProvider.GetDependency<IOrganizationUserRepository>().GetByOrganizationAsync(orgId, orgUser.UserId.Value)
.Returns(orgUser);
sutProvider.GetDependency<ICollectionRepository>()
.GetByIdAsync(Arg.Any<Guid>(), orgUser.UserId.Value, Arg.Any<bool>())
.Returns(new CollectionDetails());
var collectionRequest = new CollectionRequestModel
{
Name = "encrypted_string",