This repository was archived by the owner on Jan 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
lib/devise_security_extension/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def validate_password_archive
1616
1717 # validate is the password used in the past
1818 def password_archive_included?
19- unless deny_old_passwords . is_a? Fixnum
19+ unless deny_old_passwords . is_a? Integer
2020 if deny_old_passwords . is_a? TrueClass and archive_count > 0
2121 self . deny_old_passwords = archive_count
2222 else
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ module PasswordExpirable
1313
1414 # is an password change required?
1515 def need_change_password?
16- if self . expire_password_after . is_a? Fixnum or self . expire_password_after . is_a? Float
16+ if self . expire_password_after . is_a? Integer or self . expire_password_after . is_a? Float
1717 self . password_changed_at . nil? or self . password_changed_at < self . expire_password_after . seconds . ago
1818 else
1919 false
@@ -22,15 +22,15 @@ def need_change_password?
2222
2323 # set a fake datetime so a password change is needed and save the record
2424 def need_change_password!
25- if self . expire_password_after . is_a? Fixnum or self . expire_password_after . is_a? Float
25+ if self . expire_password_after . is_a? Integer or self . expire_password_after . is_a? Float
2626 need_change_password
2727 self . save ( :validate => false )
2828 end
2929 end
3030
3131 # set a fake datetime so a password change is needed
3232 def need_change_password
33- if self . expire_password_after . is_a? Fixnum or self . expire_password_after . is_a? Float
33+ if self . expire_password_after . is_a? Integer or self . expire_password_after . is_a? Float
3434 self . password_changed_at = self . expire_password_after . seconds . ago
3535 end
3636
@@ -39,7 +39,7 @@ def need_change_password
3939
4040 self . password_changed_at
4141 end
42-
42+
4343 def expire_password_after
4444 self . class . expire_password_after
4545 end
You can’t perform that action at this time.
0 commit comments