-
Notifications
You must be signed in to change notification settings - Fork 643
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
[Organizations] Minor bug fixes from dev #5576
Conversation
@@ -29,6 +29,8 @@ public User CurrentUser | |||
get { return NuGetContext.CurrentUser; } | |||
} | |||
|
|||
public IContentObjectService ContentObjectService => DependencyResolver.Current.GetService<IContentObjectService>(); |
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.
Would use Lazy<>
on these
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.
done
.FirstOrDefault(u => | ||
u.Username.Equals(username, StringComparison.OrdinalIgnoreCase) || | ||
string.Equals(u.EmailAddress, emailAddress, StringComparison.OrdinalIgnoreCase)); | ||
.FirstOrDefault(u => u.Username == username || u.EmailAddress == emailAddress); |
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.
Yeah this is already case-insensitive thanks to our DB collation.
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.
Yup, was 500'ing before with the string.Equals
1 - Fetch the image immediately for the text box on the add page if the form is already filled (e.g. if form submission fails, show the image from the email already.
2 - Don't use
string.Equals
in EF queryables because it throws on Azure SQL lol.3 - Show the
Manage Organizations
page for users who are allowed to create an org.