1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Be sure to halt on failures, closes #856

This commit is contained in:
José Valim 2011-02-24 22:31:48 +01:00
parent 43a3431c3e
commit 392e664036
5 changed files with 5 additions and 3 deletions

View file

@ -16,6 +16,7 @@
* Custom failure apps no longer ignored in test mode (by github.com/jaghion)
* Do not depend on ActiveModel::Dirty
* Manual sign_in now triggers remember token
* Be sure to halt strategies on failures
* deprecations
* Deprecated anybody_signed_in? in favor of signed_in? (by github.com/gavinhughes)

View file

@ -21,6 +21,7 @@ module Devise
case result
when String, Symbol
fail!(result)
false
when TrueClass
decorate(resource)
true

View file

@ -10,7 +10,7 @@ module Devise
if validate(resource){ resource.valid_password?(password) }
resource.after_database_authentication
success!(resource)
else
elsif !halted?
fail(:invalid)
end
end

View file

@ -20,7 +20,7 @@ module Devise
if validate(resource)
success!(resource)
else
elsif !halted?
cookies.delete(remember_key)
pass
end

View file

@ -20,7 +20,7 @@ module Devise
if validate(resource)
resource.after_token_authentication
success!(resource)
else
elsif !halted?
fail(:invalid_token)
end
end