Commit 33126227af662a454538d5a64762d19165f3c65d
1 parent
10489172
Exists in
master
and in
4 other branches
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`
Showing
1 changed file
with
0 additions
and
8 deletions
Show diff stats
app/controllers/application_controller.rb
@@ -2,7 +2,6 @@ class ApplicationController < ActionController::Base | @@ -2,7 +2,6 @@ class ApplicationController < ActionController::Base | ||
2 | before_filter :authenticate_user! | 2 | before_filter :authenticate_user! |
3 | before_filter :reject_blocked! | 3 | before_filter :reject_blocked! |
4 | before_filter :set_current_user_for_mailer | 4 | before_filter :set_current_user_for_mailer |
5 | - before_filter :check_token_auth | ||
6 | before_filter :set_current_user_for_observers | 5 | before_filter :set_current_user_for_observers |
7 | before_filter :dev_tools if Rails.env == 'development' | 6 | before_filter :dev_tools if Rails.env == 'development' |
8 | 7 | ||
@@ -26,13 +25,6 @@ class ApplicationController < ActionController::Base | @@ -26,13 +25,6 @@ class ApplicationController < ActionController::Base | ||
26 | 25 | ||
27 | protected | 26 | protected |
28 | 27 | ||
29 | - def check_token_auth | ||
30 | - # Redirect to login page if not atom feed | ||
31 | - if params[:private_token].present? && params[:format] != 'atom' | ||
32 | - redirect_to new_user_session_path | ||
33 | - end | ||
34 | - end | ||
35 | - | ||
36 | def reject_blocked! | 28 | def reject_blocked! |
37 | if current_user && current_user.blocked | 29 | if current_user && current_user.blocked |
38 | sign_out current_user | 30 | sign_out current_user |