-
Notifications
You must be signed in to change notification settings - Fork 645
Can't remove invalid users from crate owners #2736
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
Comments
This is slightly different framing, but almost the same as #1585 |
#1586 would also let us manually resolve this problem when we're aware of it (but that PR does not currently automatically mark users as deleted in the cases where we could detect it -- which in this case we could have). It needs some work to get up to date, but is something I can update if that approach is considered worthwhile |
I am currently having this problem with my crates. I would love to contribute to crates.io and fix it, but I have no idea where to start. Is there any possibility, that someone points the starting source code where to start looking for the functionality that removes an owner? Thanks in advance for help! |
Maybe here in src/models/krate.rs: pub fn owner_remove(
&self,
app: &App,
conn: &mut PgConnection,
req_user: &User,
login: &str,
) -> AppResult<()> {
let owner = Owner::find_or_create_by_login(app, conn, req_user, login)?;
let target = crate_owners::table.find((self.id(), owner.id(), owner.kind()));
diesel::update(target)
.set(crate_owners::deleted.eq(true))
.execute(conn)?;
Ok(())
} ??? |
This is similar to #1818 but for users.
What happened
foo
.someone_else
added them as an owner of a cratefoo
deleted their GitHub account (but crates.io has no real knowledge of this)foo
recreated their GitHub account with the same username (because it was still available), but in this situation GitHub assigns them a new IDfoo
now logs in to crates.io, it's a different account than their oldfoo
crates.io account because of the new GitHub ID (and if it wasn't, this would be a security problem)foo
account is NOT an owner of the cratesomeone_else
can't add the newfoo
account as an owner, nor can they remove the oldfoo
as an owner :(What should happen
The text was updated successfully, but these errors were encountered: