Update CHANGELOG

This commit is contained in:
José Valim
2012-12-13 08:43:43 +01:00
parent 73389ea491
commit e1fde192f2
4 changed files with 6 additions and 3 deletions

View File

@@ -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)

View File

@@ -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.'

View File

@@ -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

View File

@@ -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