Skip to content

controllers/owners: Compare user owners by ID - #14589

Open
Turbo87 wants to merge 4 commits into
rust-lang:mainfrom
Turbo87:owner-invite-identity
Open

controllers/owners: Compare user owners by ID#14589
Turbo87 wants to merge 4 commits into
rust-lang:mainfrom
Turbo87:owner-invite-identity

Conversation

@Turbo87

@Turbo87 Turbo87 commented Sep 4, 2026

Copy link
Copy Markdown
Member

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

@Turbo87 Turbo87 added the C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear label Sep 4, 2026
@Turbo87
Turbo87 requested a review from a team September 4, 2026 21:54
@rustbot

This comment has been minimized.

Turbo87 and others added 4 commits September 5, 2026 10:28
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
Turbo87 force-pushed the owner-invite-identity branch from 45fa749 to 02d85b6 Compare September 5, 2026 08:39
@rustbot

rustbot commented Sep 5, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants