[PM-38272] fix: handle null or empty permissions in OrganizationUserResponseModel - #8207
Conversation
Updated the OrganizationUserResponseModel to set Permissions to null if the input is null or whitespace, ensuring proper handling of permissions data. Added JsonIgnore attribute to exclude null Permissions from JSON serialization.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR stops emitting an all-false Code Review DetailsNo blocking findings. The previously raised duplication of the null guard was addressed by switching to Note: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8207 +/- ##
=========================================
+ Coverage 0 63.22% +63.22%
=========================================
Files 0 2381 +2381
Lines 0 103757 +103757
Branches 0 9385 +9385
=========================================
+ Hits 0 65604 +65604
- Misses 0 35924 +35924
- Partials 0 2229 +2229 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Replaced the previous permissions loading logic with a direct call to GetPermissions() method, enhancing code clarity and maintainability. Removed unnecessary null or whitespace checks for permissions.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-38272
📔 Objective
Stops sending back empty permissions model for non-custom users