mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 00:38:27 +00:00
Merge commit '42ab855b2339c5cea3229c856ab539f883736b12' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/auth/confirmations_controller.rb`: Upstream refactored, changing lines textually close of glitch-soc-only lines pertaining to the theming system. Resolved the conflict. - `app/controllers/auth/passwords_controller.rb`: Upstream refactored, changing lines textually close of glitch-soc-only lines pertaining to the theming system. Resolved the conflict. - `app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb`: Upstream refactored, changing lines textually close of glitch-soc-only lines pertaining to the theming system. Resolved the conflict.
This commit is contained in:
@@ -8,7 +8,7 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
||||
before_action :set_body_classes
|
||||
before_action :set_pack
|
||||
before_action :set_confirmation_user!, only: [:show, :confirm_captcha]
|
||||
before_action :require_unconfirmed!
|
||||
before_action :redirect_confirmed_user, if: :signed_in_confirmed_user?
|
||||
|
||||
before_action :extend_csp_for_captcha!, only: [:show, :confirm_captcha]
|
||||
before_action :require_captcha_if_needed!, only: [:show]
|
||||
@@ -70,10 +70,12 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
||||
use_pack 'auth'
|
||||
end
|
||||
|
||||
def require_unconfirmed!
|
||||
if user_signed_in? && current_user.confirmed? && current_user.unconfirmed_email.blank?
|
||||
redirect_to(current_user.approved? ? root_path : edit_user_registration_path)
|
||||
end
|
||||
def redirect_confirmed_user
|
||||
redirect_to(current_user.approved? ? root_path : edit_user_registration_path)
|
||||
end
|
||||
|
||||
def signed_in_confirmed_user?
|
||||
user_signed_in? && current_user.confirmed? && current_user.unconfirmed_email.blank?
|
||||
end
|
||||
|
||||
def set_body_classes
|
||||
|
||||
Reference in New Issue
Block a user