Skip to content

Commit

Permalink
Fix PermalinkRedirector not applying to users with moved accounts (ma…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and Nonexistent committed Jan 12, 2023
1 parent 9f82389 commit a8415a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/concerns/web_app_controller_concern.rb
Expand Up @@ -4,7 +4,7 @@ module WebAppControllerConcern
extend ActiveSupport::Concern

included do
before_action :redirect_unauthenticated_to_permalinks!
prepend_before_action :redirect_unauthenticated_to_permalinks!
before_action :set_app_body_class
before_action :set_referrer_policy_header
end
Expand All @@ -18,7 +18,7 @@ def set_referrer_policy_header
end

def redirect_unauthenticated_to_permalinks!
return if user_signed_in?
return if user_signed_in? && current_account.moved_to_account_id.nil?

redirect_path = PermalinkRedirector.new(request.path).redirect_path

Expand Down

0 comments on commit a8415a7

Please sign in to comment.