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

Fix bug letting already logged in users see login and forgot password forms #728

Merged
merged 14 commits into from
Sep 12, 2019
Merged

Fix bug letting already logged in users see login and forgot password forms #728

merged 14 commits into from
Sep 12, 2019

Conversation

arandomandy
Copy link
Contributor

No description provided.

The following validation *validates_each :username* was causing
multiple actions that operate on a user to fail, throwing a 500 error.

This was preventing the inactive-user user account from being
created by *rake db:seed* as well as preventing the inactive-user
user to reset their password.
The error was caused by *user1* trying to log in while *user* was
already logged in.
Copy link
Contributor

@thomasdziedzic thomasdziedzic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think you have a good PR which just needs some minor changes.

Note that there is another PR which solves part of what this PR is solving at #727

spec/controllers/login_controller_spec.rb Outdated Show resolved Hide resolved
spec/controllers/login_controller_spec.rb Outdated Show resolved Hide resolved
spec/controllers/login_controller_spec.rb Outdated Show resolved Hide resolved
spec/features/comment_spec.rb Outdated Show resolved Hide resolved
@pushcx
Copy link
Member

pushcx commented Sep 4, 2019

Thomas, thanks for jumping in to guide this PR, I appreciate you working through it with arandomandy.

@pushcx
Copy link
Member

pushcx commented Sep 11, 2019

Thanks for taking this on. It's satisfying to squash these small bugs. If you bring in @thomasdziedzic's suggestion for the logout test, this is ready to merge.

@pushcx pushcx merged commit 7c1b332 into lobsters:master Sep 12, 2019
@pushcx
Copy link
Member

pushcx commented Sep 12, 2019

Deployed this fix. Thanks for contributing so many, and thanks to @thomasdziedzic for puzzling out our test issue.

pushcx pushed a commit that referenced this pull request Jan 7, 2022
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.

3 participants