-
-
Notifications
You must be signed in to change notification settings - Fork 5
Various forgotten fixups necessary for emails being nullable #667
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
Conversation
C# Unit Tests26 tests 26 ✅ 4s ⏱️ Results for commit 8aba105. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks reasonable to me, I didn't test it though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, and everything seems to work. One feature that's not in here is editing the username of a user with no email (can edit display name, but not username). That should probably be in a different PR, though. This one LGTM.
One issue revealed in testing: if you edit a user with no email, type something into the email box, then delete it, you can't submit the form. (Because the field went from I triggered this by accident when I was trying to edit the display name of a bulk-added user, and edited the email field by mistake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just turned up an issue I missed in earlier testing: if you accidentally type into the email field, then delete what you typed, you end up unable to submit the form.
Allowing that scenario would involve treating an empty string in the email column as if it was a null
/undefined
. If we add that, we'll also accidentally enable admins to delete a user's email address. That may or may not be desirable. Still, I think this scenario should be fixed somehow.
I think usernames can be read-only. I think that's fairly common. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great; everything looks good now.
Fixes #657
FYI the form validation change (
.nullable()
) doesn't allow a user to delete an existing email address.But even if they could the server would ignore it, because it ignores empty values.