[PM-41448] feat: add unified collection PATCH endpoint with delta access - #8138
Draft
r-tome wants to merge 2 commits into
Draft
[PM-41448] feat: add unified collection PATCH endpoint with delta access#8138r-tome wants to merge 2 commits into
r-tome wants to merge 2 commits into
Conversation
…ess for users and groups
… handler and filter
Comment on lines
+26
to
+33
| catch (Exception exception) | ||
| { | ||
| var endpointName = context.HttpContext.GetEndpoint()?.DisplayName; | ||
| context.HttpContext.RequestServices.GetRequiredService<ILogger<AdminConsoleExceptionHandlerEndpointFilter>>() | ||
| .LogError(exception, "Unhandled exception in {EndpointName}", endpointName); | ||
| return TypedResults.Json( | ||
| new ErrorResponseModel("An error has occurred."), statusCode: StatusCodes.Status500InternalServerError); | ||
| } |
| await sutProvider.GetDependency<IModifyCollectionUserAccessCommand>().Received(1) | ||
| .ModifyAsync(Arg.Is<ModifyCollectionUserAccessRequest>(r => | ||
| r.PerformingOrganizationUserId == callerOrgUserId | ||
| && r.AllowAdminAccessToAllCollectionItems == true)); |
| await sutProvider.GetDependency<IModifyCollectionGroupAccessCommand>().Received(1) | ||
| .ModifyAsync(Arg.Is<ModifyCollectionGroupAccessRequest>(r => | ||
| r.PerformingOrganizationUserId == callerOrgUserId | ||
| && r.AllowAdminAccessToAllCollectionItems == true)); |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## ac/pm-41270/collection-group-auth-handler #8138 +/- ##
=============================================================================
- Coverage 66.92% 62.49% -4.44%
=============================================================================
Files 2309 2318 +9
Lines 100539 100669 +130
Branches 9087 9098 +11
=============================================================================
- Hits 67284 62909 -4375
- Misses 30976 35575 +4599
+ Partials 2279 2185 -94 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-41448
📔 Objective
Adds a feature-flagged
PATCH organizations/{orgId}/collections/{id}Minimal API endpoint that updates collection metadata and applies user/group access deltas in a single atomic transaction. The existingPUTendpoint is unchanged — when the flag is off, clients continue using it as before.Also resolves PM-35161 by adding the
PM35160CollectionAuthorizationHandlersfeature flag constant back tosrc/Core/Constants.cs.📸 Screenshots
N/A — server-only change.