mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 08:08:00 -05:00
Update CHANGELOG
This commit is contained in:
@@ -6,8 +6,11 @@
|
||||
* Add autofocus to default views (by @Radagaisus)
|
||||
* Support Mongoid 3 onwards (by @durran)
|
||||
* Unlock user on password reset (by @marcinb)
|
||||
* Allow validation callbacks to apply to virtual attributes (by @latortuga)
|
||||
* Support alternate sign in error message when email record does not exist (@gabetax)
|
||||
|
||||
* bug fix
|
||||
* Fix default email_regexp config to not allow spaces (by @kukula)
|
||||
* Fix a regression introduced on warden 1.2.1 (by @ejfinneran)
|
||||
* Properly camelize omniauth strategies (by @saizai)
|
||||
* Do not set flash messages for non navigational requests on session sign out (by @mathieul)
|
||||
|
||||
@@ -18,8 +18,8 @@ en:
|
||||
unauthenticated: 'You need to sign in or sign up before continuing.'
|
||||
unconfirmed: 'You have to confirm your account before continuing.'
|
||||
locked: 'Your account is locked.'
|
||||
not_found_in_database: 'Invalid email or password.'
|
||||
invalid: 'Invalid email or password.'
|
||||
invalid_email: 'Invalid email or password.'
|
||||
invalid_token: 'Invalid authentication token.'
|
||||
timeout: 'Your session expired, please sign in again to continue.'
|
||||
inactive: 'Your account was not activated yet.'
|
||||
|
||||
@@ -6,7 +6,7 @@ module Devise
|
||||
class DatabaseAuthenticatable < Authenticatable
|
||||
def authenticate!
|
||||
resource = valid_password? && mapping.to.find_for_database_authentication(authentication_hash)
|
||||
return fail(:invalid_email) unless resource
|
||||
return fail(:not_found_in_database) unless resource
|
||||
|
||||
if validate(resource){ resource.valid_password?(password) }
|
||||
resource.after_database_authentication
|
||||
|
||||
@@ -53,7 +53,7 @@ class DatabaseAuthenticationTest < ActionController::IntegrationTest
|
||||
end
|
||||
|
||||
test 'sign in with invalid email should return to sign in form with error message' do
|
||||
store_translations :en, :devise => { :failure => { :admin => { :invalid_email => 'Invalid email address' } } } do
|
||||
store_translations :en, :devise => { :failure => { :admin => { :not_found_in_database => 'Invalid email address' } } } do
|
||||
sign_in_as_admin do
|
||||
fill_in 'email', :with => 'wrongemail@test.com'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user