improves expired password view
This commit is contained in:
@@ -55,16 +55,13 @@ module Devise
|
|||||||
def password_expired?
|
def password_expired?
|
||||||
self.password_changed_at < self.expire_password_after.ago
|
self.password_changed_at < self.expire_password_after.ago
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end #module PasswordExpirable
|
|
||||||
|
|
||||||
module SecureValidatable
|
module SecureValidatable
|
||||||
def self.included(base)
|
def self.included(base)
|
||||||
base.extend ClassMethods
|
base.extend ClassMethods
|
||||||
assert_secure_validations_api!(base)
|
assert_secure_validations_api!(base)
|
||||||
|
|
||||||
base.class_eval do
|
base.class_eval do
|
||||||
|
|
||||||
validate :current_equal_password_validation
|
validate :current_equal_password_validation
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -77,8 +74,6 @@ module Devise
|
|||||||
self.errors.add(:password, :equal_to_current_password) if dummy.valid_password?(self.password)
|
self.errors.add(:password, :equal_to_current_password) if dummy.valid_password?(self.password)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end #module SecureValidatable
|
end
|
||||||
|
end
|
||||||
end #module Models
|
|
||||||
end #module Devise
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
class AddPasswordExpired < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -333,7 +333,6 @@ feature 'Users' do
|
|||||||
fill_in 'user_password_confirmation', with: '123456789'
|
fill_in 'user_password_confirmation', with: '123456789'
|
||||||
click_button 'Change your password'
|
click_button 'Change your password'
|
||||||
expect(page).to have_content "must be different than the current password."
|
expect(page).to have_content "must be different than the current password."
|
||||||
#expect(page).to have_content "You can not use the same password. Please choose another one."
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user