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