Merge pull request #1733 from dnrce/password-hashing

Remove support for deprecated password hashing algorithm
This commit is contained in:
Dan Rice 2014-12-14 14:35:32 -05:00
commit b9f3b9685f
19 changed files with 17 additions and 164 deletions

View file

@ -12,7 +12,6 @@ class ApplicationController < ActionController::Base
layout proc{ |controller| controller.mobile? ? "mobile" : "application" }
# exempt_from_layout /\.js\.erb$/
before_filter :check_for_deprecated_password_hash
before_filter :set_session_expiration
before_filter :set_time_zone
before_filter :set_zindex_counter
@ -58,15 +57,6 @@ class ApplicationController < ActionController::Base
end
end
# Redirects to change_password_user_path if the current user uses a
# deprecated password hashing algorithm.
def check_for_deprecated_password_hash
if current_user and current_user.uses_deprecated_password?
notify :warning, t('users.you_have_to_reset_your_password')
redirect_to change_password_user_path current_user
end
end
def render_failure message, status = 404
render :text => message, :status => status
end