-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-23768] Public API - add restore and revoke member endpoint #6859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[PM-23768] Public API - add restore and revoke member endpoint #6859
Conversation
…blic-api---add-restore/revoke-for-members
|
Claude finished @eliykat's task in 2m 34s —— View job Code Review: ApprovedReviewed: All changes including incremental updates since 2026-01-16 SummaryThis PR adds restore and revoke endpoints to the Public API for organization members. The implementation is clean and follows established patterns. Changes reviewed:
Security - Organization ownership is properly validated before performing operations. Both endpoints verify Design Decisions - The choice of POST over PUT is well-justified per RFC9110 since these are non-idempotent operations (revoking twice returns different status codes). Error Handling - Properly leverages the existing error handling infrastructure:
Test Coverage - Comprehensive integration tests covering:
Recent fixes verified:
No issues found. |
test/Api.IntegrationTest/AdminConsole/Public/Controllers/MembersControllerTests.cs
Outdated
Show resolved
Hide resolved
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6859 +/- ##
==========================================
+ Coverage 56.07% 56.10% +0.03%
==========================================
Files 1968 1968
Lines 86927 86956 +29
Branches 7742 7744 +2
==========================================
+ Hits 48740 48783 +43
+ Misses 36386 36370 -16
- Partials 1801 1803 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…revoke-for-members
…revoke-for-members
…revoke-for-members

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-23768
📔 Objective
Add endpoints to the public API to restore and revoke members.
Implementation decisions:
added explicit restore and revoke endpoints, instead of allowing PUT to update a member's
status. This is because there are other statuses as well (invited, accepted, confirmed) and you cannot transition from any status to any other status. Allowing arbitrary writes to the member's status would be likely to cause confusion.used POST instead of PUT. From RFC9110:
In this case, the operation is not idempotent: revoking a user once returns a 200 OK result, revoking a user twice returns a 400 Bad Request (already revoked). Also, the request is not replacing the resource with the resource in the request - it is telling the server to perform an action according to its own semantics. This suggests that POST is the better choice.
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes