Repository navigation
fix: include user updates when revoking tokens - #228
Open
pcbeingused333 wants to merge 1 commit into
Open
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
pcbeingused333
requested review from
JimmyPettersson85,
nijeesh-stream,
shaljam and
vishalnarkhede
as code owners
November 10, 2026 12:51
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.
CLA
Description of the pull request
revoke_users_tokenbuilds a partial update for each user withmap, but discards the resulting array and passes an emptyupdatesarray toupdate_users_partial. As a result, bothrevoke_users_tokenand its single-user wrapperrevoke_user_tokensendusers: [], so no tokens are actually revoked.Assign the mapped updates to
updatesso the PATCH request includes every requested user.Testing
New offline spec
spec/revoke_tokens_spec.rb(HTTP mocked, no API key needed) checks the PATCH payload for multiple users with aDateTime, one user with a string timestamp, and an empty list. Onmasterthe two non-empty cases fail because the payload isusers: []; with the fix all three pass.This change and its regression tests were prepared with OpenAI Codex.
Note
Medium Risk
Touches token revocation (auth-related), but the change is a minimal bug fix with new regression specs and no API surface change.
Overview
Fixes
revoke_users_token(and the single-userrevoke_user_tokenwrapper) so user token revocation actually reaches the API. Previously the method built per-user partial updates withmapbut leftupdatesempty, soupdate_users_partialalways sentusers: []and no tokens were revoked.The change assigns the mapped array to
updates, each entry settingrevoke_tokens_issued_beforeafter timestamp normalization.Adds
spec/revoke_tokens_spec.rbwith mocked HTTP coverage for multi-userDateTimeinput, single-user string timestamps, and the empty user list case.Reviewed by Cursor Bugbot for commit 60bf634. Bugbot is set up for automated code reviews on this repo. Configure here.