Skip to content

Conversation

@kspearrin
Copy link
Member

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PFI-1019

📔 Objective

Group information was missing on collection object returned from GET /public/collections API. Added it in using data on the collectionRepository.GetManyByOrganizationIdWithAccessAsync() query.

_currentContext.OrganizationId.Value);
// TODO: Get all CollectionGroup associations for the organization and marry them up here for the response.
var collectionResponses = collections.Select(c => new CollectionResponseModel(c, null));
// TODO: Do we need to filter out DefaultUserCollection types here like we do in Get above?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@r-tome Shouldn't we do this here too? I see you added it to the GET by id above in #6021. Not sure why it wasn't added here too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_collectionRepository.GetManySharedCollectionsByOrganizationIdAsync already filters out DefaultUserCollection types.
You're right that if we use GetManyByOrganizationIdWithAccessAsync then we need to filter it out here

@github-actions
Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Details04f23d22-fc08-4d6d-a54b-58e1dd84e5d8

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.86%. Comparing base (cfe818e) to head (e5df380).

Files with missing lines Patch % Lines
...rc/Api/Public/Controllers/CollectionsController.cs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6524   +/-   ##
=======================================
  Coverage   51.86%   51.86%           
=======================================
  Files        1902     1902           
  Lines       84058    84058           
  Branches     7501     7501           
=======================================
  Hits        43598    43598           
  Misses      38766    38766           
  Partials     1694     1694           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants