Conversation
…or user and group access modifications, and add corresponding unit tests to ensure correct behavior when the feature flag is enabled.
…for authorization logic based on user roles and feature flags.
… authorization based on roles and feature flags
…s and CollectionUserAuthorizationHandlerTests for clarity and consistency, enhancing readability and understanding of test purposes.
…onHandler to the authorization handler registration
…ss authorization, refactoring authorization logic to support new operations and enhancing unit tests for various scenarios.
…roup access authorization, refactoring authorization logic and adding new methods for improved access management. Update unit tests to cover new scenarios and ensure correct behavior with feature flag enabled.
…ks for collection access authorization, enhancing the authorization logic for user and group operations. Introduce new methods for improved access management and update unit tests to validate behavior with the feature flag enabled.
…a user attempts to add themselves to a collection
…thorization methods. Introduce separate methods for user and group access changes, enhancing clarity and maintainability of the authorization logic. Update authorization checks to align with new method structure.
…tionHandlerTests to throw BadRequestException for self-assignment attempts. Enhance unit tests to validate new exception handling and authorization logic for user and group operations.
…ccess checks. Update methods to use ICollection for collections and ensure early return for empty collections, enhancing clarity and efficiency in authorization handling.
…ctions in authorization checks. Update CanManageCollectionsAsync method to include organization role and permissions, allowing Admin and Owner roles to manage orphaned collections. Add unit tests to validate authorization logic for various user roles and permissions regarding orphaned collections.
…tions in authorization checks. Update CanManageCollectionsAsync method to include organization context, allowing Admin and Owner roles to manage orphaned collections. Add unit tests to validate authorization logic for various user roles and permissions regarding orphaned collections.
|
New Issues (2)Checkmarx found the following issues in this Pull Request
|
…ongroup-logic-to-dedicated-handlers # Conflicts: # src/Core/Constants.cs
…GroupAccess as obsolete, replacing them with CollectionUserOperations and CollectionGroupOperations respectively. Update documentation to reflect changes.
Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR introduces dedicated Code Review DetailsNo actionable findings identified. The authorization logic, feature flag gating, and test coverage are all sound. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7442 +/- ##
==========================================
+ Coverage 58.66% 58.80% +0.14%
==========================================
Files 2066 2072 +6
Lines 91089 91489 +400
Branches 8106 8179 +73
==========================================
+ Hits 53440 53804 +364
- Misses 35740 35759 +19
- Partials 1909 1926 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ongroup-logic-to-dedicated-handlers # Conflicts: # src/Core/Constants.cs
…ongroup-logic-to-dedicated-handlers # Conflicts: # src/Api/AdminConsole/Controllers/GroupsController.cs
|






🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-12473
📔 Objective
Extracts user-access and group-access authorization from
BulkCollectionAuthorizationHandlerinto dedicatedCollectionUserAuthorizationHandlerandCollectionGroupAuthorizationHandler, gated behind a feature flag.