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

Improve remember token logins #334

Merged
merged 1 commit into from Aug 16, 2013
Merged

Improve remember token logins #334

merged 1 commit into from Aug 16, 2013

Conversation

@gylaz
Copy link
Contributor

@gylaz gylaz commented Aug 9, 2013

  • Don't allow blank remember_token (Fixes #333)
  • Add validation of remember_token to avoid blanks
  • Rename denies_controller_spec.rb -> permissions_controller_spec.rb
Clearance.configuration.user_model.find_by_remember_token token
if remember_token.present?
@current_user ||= Clearance.configuration.user_model.
where(remember_token: remember_token).first
Copy link
Contributor

@croaky croaky Aug 9, 2013

Maybe break each of these dots onto their own lines or extract another private method for it like user_from_remember_token.

@croaky
Copy link
Contributor

@croaky croaky commented Aug 9, 2013

Couple of comments but otherwise looks good if Travis passes it. Would like another thoughtbot dev to take a look at it as well.

@JoelQ
Copy link
Contributor

@JoelQ JoelQ commented Aug 16, 2013

Looks good to me 👍

* Rename denies_controller_spec.rb -> permissions_controller_spec.rb
* Fixes #333
@gylaz gylaz merged commit 932dac9 into master Aug 16, 2013
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants