From: Thibaut Girka Date: Wed, 24 Jun 2020 13:33:41 +0000 (+0200) Subject: Merge branch 'master' into glitch-soc/merge-upstream X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=aae60a2366d6dadbcc4a0197d4dd17afc931c8a0;p=mastodon.git Merge branch 'master' into glitch-soc/merge-upstream Conflicts: - `app/controllers/concerns/sign_in_token_authentication_concern.rb`: Conflict due to glitch-soc's theming system. Ported upstream changes. - `app/controllers/concerns/two_factor_authentication_concern.rb`: Conflict due to glitch-soc's theming system. Ported upstream changes. --- aae60a2366d6dadbcc4a0197d4dd17afc931c8a0 diff --cc app/controllers/concerns/sign_in_token_authentication_concern.rb index 88c009b19,91f813acc..f5178930b --- a/app/controllers/concerns/sign_in_token_authentication_concern.rb +++ b/app/controllers/concerns/sign_in_token_authentication_concern.rb @@@ -42,9 -42,10 +42,11 @@@ module SignInTokenAuthenticationConcer UserMailer.sign_in_token(user, request.remote_ip, request.user_agent, Time.now.utc.to_s).deliver_later! end - session[:attempt_user_id] = user.id - use_pack 'auth' - @body_classes = 'lighter' - render :sign_in_token + set_locale do + session[:attempt_user_id] = user.id ++ use_pack 'auth' + @body_classes = 'lighter' + render :sign_in_token + end end end diff --cc app/controllers/concerns/two_factor_authentication_concern.rb index 0d9f87455,daafe56f4..35c0c27cf --- a/app/controllers/concerns/two_factor_authentication_concern.rb +++ b/app/controllers/concerns/two_factor_authentication_concern.rb @@@ -40,9 -40,10 +40,11 @@@ module TwoFactorAuthenticationConcer end def prompt_for_two_factor(user) - session[:attempt_user_id] = user.id - use_pack 'auth' - @body_classes = 'lighter' - render :two_factor + set_locale do + session[:attempt_user_id] = user.id ++ use_pack 'auth' + @body_classes = 'lighter' + render :two_factor + end end end diff --cc app/controllers/directories_controller.rb index adf2bd014,f198ad5ba..549c6a39e --- a/app/controllers/directories_controller.rb +++ b/app/controllers/directories_controller.rb @@@ -8,9 -8,8 +8,9 @@@ class DirectoriesController < Applicati before_action :set_instance_presenter before_action :set_tag, only: :show before_action :set_accounts + before_action :set_pack - skip_before_action :require_functional! + skip_before_action :require_functional!, unless: :whitelist_mode? def index render :index diff --cc app/controllers/remote_interaction_controller.rb index 51bb9bdea,6c29a2b9f..a277bfa10 --- a/app/controllers/remote_interaction_controller.rb +++ b/app/controllers/remote_interaction_controller.rb @@@ -9,9 -9,8 +9,9 @@@ class RemoteInteractionController < App before_action :set_interaction_type before_action :set_status before_action :set_body_classes + before_action :set_pack - skip_before_action :require_functional! + skip_before_action :require_functional!, unless: :whitelist_mode? def new @remote_follow = RemoteFollow.new(session_params)