controllers/owners: Compare user owners by ID - #14589
Open
Turbo87 wants to merge 4 commits into
Open
Conversation
This comment has been minimized.
This comment has been minimized.
The tests cover highest GitHub ID selection independently of crates.io ID ordering, duplicate-owner rejection before user resolution, and removal of all matching owners. Co-authored-by: moskirathe <tech@alphajiri.co>
`invite_user_owner()` accepts a resolved user. `add_owner()` retains the existing lookup and not-found error after the duplicate-owner check. Co-authored-by: moskirathe <tech@alphajiri.co>
User invitations now compare the resolved account ID against existing user owners. This prevents a reused GitHub login from making a different account appear to already own the crate. Both duplicate checks run inside `add_owner()` after parsing. Team checks still compare names before making GitHub requests. User lookup errors take precedence over duplicate-owner errors. Co-authored-by: moskirathe <tech@alphajiri.co>
Turbo87
force-pushed
the
owner-invite-identity
branch
from
September 5, 2026 08:39
45fa749 to
02d85b6
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
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.
User invitations now resolve the requested account before checking existing ownership and compare crates.io user IDs instead of login strings. This prevents a reused GitHub login from making a different account appear to already own the crate while preserving the existing team checks and lookup error precedence.
The test now also cover highest-ID account selection and removal of all owners matching a reused GitHub login. This work was partially extracted from #14213 so the identity fix can be reviewed independently from the username-prefix and disambiguation changes.
Related
cargo ownerparam handling and error messages #13769