Browse Source

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

Fixes #22262
closed-social-glitch-2
Claire 1 year ago
committed by GitHub
parent
commit
42f9693d00
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/controllers/concerns/web_app_controller_concern.rb

+ 2
- 2
app/controllers/concerns/web_app_controller_concern.rb View File

@ -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

Loading…
Cancel
Save