AO3-6359 Fix Possible to delete the pseud that corresponds with your username if the capitalization or diacritics differ #5534
+28
−12
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.
AO3-6359 Fix Possible to delete the pseud that corresponds with your username if the capitalization or diacritics differ
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-6359
Purpose
What does this PR do?
Fixes issue AO3-6359 where it was possible to delete the pseud that corresponds to your username if you already had a pseud with the same spelling but different capitalization or diacritics, the fix was to add a new path to the psued update function for when a username is updated. This new path checks if the user already has a matching pseud and updates the capitalization and diacritics to match the new username.
Testing Instructions
How can the Archive's QA team verify that this is working as you intended?
Similar to replication instructions from the ticket except for step number 4 where delete is now not possible.
a. Hi, username! > My Preferences > Manage My Pseuds > New Pseud
b. Fill in the “Name” field with a something that will also be valid as a username (and is not currently someone’s username), e.g. Issue6359Test
c. Press "Create Pseud"
a. Hi, username! > My Preferences > Change Username
b. Fill in the “New user name” field with a differently capitalized version of your new pseud, e.g. issue6359test
c. Fill in the “Password” field with your account password
d. Press “Change Username”
a. Hi, username! > My Preferences > Manage My Pseuds
b. There should not be an option to delete the pseud
If you have a Jira account with access, please update or comment on the issue
with any new or missing testing instructions instead.
You can remove this section if there are already full testing instructions in the Jira issue.
References
Are there other relevant issues/pull requests/mailing list discussions? If not, you can remove this section.
Yes: Old closed pull request for the same issue: #4307 (Closed for being years old)
Thank you Sarken, Brianjaustin, and Tickinginstant for your comments on the above PR, I have attempted to address them all in this new PR.
Credit
Credit
Dobe He/Him
What name and pronouns should we use to credit you in the Archive of Our Own's Release Notes?
If you have a Jira account, please include the same name in the "Full name"
field on your Jira profile, so we can assign you the issues you're working on.
Please note that if you do not fill in this section, we will use your GitHub account name and
they/them pronouns.