0
0
Fork 0

Move body class to shared partial for web app controller concern views (#31797)

This commit is contained in:
Matt Jankowski 2024-11-15 10:49:26 -05:00 committed by GitHub
parent 34d7c9edae
commit 297ce9ef44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 6 additions and 5 deletions

View file

@ -7,7 +7,6 @@ module WebAppControllerConcern
vary_by 'Accept, Accept-Language, Cookie'
before_action :redirect_unauthenticated_to_permalinks!
before_action :set_app_body_class
content_security_policy do |p|
policy = ContentSecurityPolicy.new
@ -24,10 +23,6 @@ module WebAppControllerConcern
!(ENV['ONE_CLICK_SSO_LOGIN'] == 'true' && ENV['OMNIAUTH_ONLY'] == 'true' && Devise.omniauth_providers.length == 1) && current_user.nil?
end
def set_app_body_class
@body_classes = 'app-body'
end
def redirect_unauthenticated_to_permalinks!
return if user_signed_in? && current_account.moved_to_account_id.nil?