[PM-38326] Utilize cache for UsePolicies - #8205
Conversation
…e service in PoliciesController Updated PoliciesController to utilize IOrganizationAbilityCacheService instead of IOrganizationRepository for fetching organization abilities. Adjusted related tests to reflect this change, ensuring proper handling of organization policies based on the new service.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR swaps the per-request Code Review DetailsNo findings. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8205 +/- ##
=========================================
+ Coverage 0 63.22% +63.22%
=========================================
Files 0 2381 +2381
Lines 0 103757 +103757
Branches 0 9385 +9385
=========================================
+ Hits 0 65603 +65603
- Misses 0 35925 +35925
- Partials 0 2229 +2229 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-38326
📔 Objective
Replaces the per-request
OrganizationDB lookup inPoliciesController.GetByTokenandGetMasterPasswordPolicywith a read from the existingOrganizationAbilitycache, since the only thing needed (UsePolicies) is already cached there. This avoids an unnecessary full database call on every invite-link click and master password policy check