Skip to content
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

Merged
merged 2 commits into from
Mar 5, 2018
Merged

[Organizations] Minor bug fixes from dev #5576

merged 2 commits into from
Mar 5, 2018

Conversation

scottbommarito
Copy link
Contributor

@scottbommarito scottbommarito commented Mar 5, 2018

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.

@@ -29,6 +29,8 @@ public User CurrentUser
get { return NuGetContext.CurrentUser; }
}

public IContentObjectService ContentObjectService => DependencyResolver.Current.GetService<IContentObjectService>();
Copy link
Member

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

Copy link
Contributor Author

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);
Copy link
Member

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.

Copy link
Contributor Author

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

@scottbommarito scottbommarito merged commit a5d96df into dev Mar 5, 2018
@scottbommarito scottbommarito deleted the sb-orgaddbugs branch March 5, 2018 20:55
@scottbommarito scottbommarito restored the sb-orgaddbugs branch July 22, 2019 23:18
@scottbommarito scottbommarito deleted the sb-orgaddbugs branch July 22, 2019 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants