Skip to content
Snippets Groups Projects
Unverified Commit 42f9693d authored by Claire's avatar Claire Committed by GitHub
Browse files

Fix PermalinkRedirector not applying to users with moved accounts (#22497)

Fixes #22262
parent 83888739
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -18,7 +18,7 @@ module WebAppControllerConcern
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment