Remove check_token_auth filter
Because of the way ExtractPaths works, `params[:format]` wouldn't necessarily be available at the time this filter was running, and so it would erroneously redirect to `new_user_session_path`
This commit is contained in:
parent
1048917232
commit
33126227af
1 changed files with 0 additions and 8 deletions
|
@ -2,7 +2,6 @@ class ApplicationController < ActionController::Base
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
before_filter :reject_blocked!
|
before_filter :reject_blocked!
|
||||||
before_filter :set_current_user_for_mailer
|
before_filter :set_current_user_for_mailer
|
||||||
before_filter :check_token_auth
|
|
||||||
before_filter :set_current_user_for_observers
|
before_filter :set_current_user_for_observers
|
||||||
before_filter :dev_tools if Rails.env == 'development'
|
before_filter :dev_tools if Rails.env == 'development'
|
||||||
|
|
||||||
|
@ -26,13 +25,6 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def check_token_auth
|
|
||||||
# Redirect to login page if not atom feed
|
|
||||||
if params[:private_token].present? && params[:format] != 'atom'
|
|
||||||
redirect_to new_user_session_path
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def reject_blocked!
|
def reject_blocked!
|
||||||
if current_user && current_user.blocked
|
if current_user && current_user.blocked
|
||||||
sign_out current_user
|
sign_out current_user
|
||||||
|
|
Loading…
Add table
Reference in a new issue