app/models/credentials/password.rb in authpwn_rails-0.16.1 vs app/models/credentials/password.rb in authpwn_rails-0.16.2

- old
+ new

@@ -9,10 +9,18 @@ confirmation: { allow_nil: true } # Virtual attribute: confirmation for the user's password. attr_accessor :password_confirmation + # Virtual attribute that lets us have an old_password field on forms. + def old_password + nil + end + def old_password=(new_old_password) + new_old_password + end + # A user can have a single password. validates :user_id, uniqueness: true # Passwords can expire, if users don't change them often enough. include Authpwn::Expires @@ -73,10 +81,10 @@ [(0...12).map { |i| 1 + rand(255) }.pack('C*')].pack('m').strip end if ActiveRecord::Base.respond_to? :mass_assignment_sanitizer= # Forms can only change the plain-text password fields. - attr_accessible :password, :password_confirmation + attr_accessible :old_password, :password, :password_confirmation end end # class Credentials::Password end # namespace Credentials