Fix being able to create community for your own GitHub username
Fix being able to create community for your own GitHub username
Fix https://gitlab.com/gitlab-org/gitter/webapp/-/issues/2462
Dev notes
The backend was already good to go and we even had a test around this case: modules/groups/test/group-uri-checker-tests.js#L109-116
Testing strategy
- Sign in with a GitHub user
- Open the create community flow
- Enter your username
- Notice the GitHub user association
- Create the community
If you enter your username with a GitLab or Twitter user, it won't try to associate
One caveat is once your GitHub user is associated, you can change the community slug to whatever. I'm fine with leaving this freedom and in the future potentially make it easier just to select your user directly. When we have multiple identity users, would be good to be able to select any of them.
If someone wants to remove the assocaition, they have to press "Change" and select another thing. And can completely de-select after selecting the same other item again.