Skip to content

Owner invite doesn't work when username is specified with different casing #2081

@YaLTeR

Description

@YaLTeR

I'm trying to invite https://crates.io/users/matherunner to my crate https://crates.io/crates/hltas. I tried adding Matherunner, matherunner as well as his email address, multiple times, always getting "An invite has been sent to matherunner". However, he never got any emails and his owner invites are empty.

Implementation instructions

  • Start from this branch that has a test that fails because the username of the invited owner is specified in a different case than it is in the database.
  • Get the test to pass by changing this filter to be case insensitive using the crate::lower function like this code does (I'm not sure why that code chooses to lowercase the provided name in Rust and then use the SQL crate::lower function on the gh_login... I think both should be done with SQL in this case?) We have an index on lower(gh_login) so this query will be fast.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions