Make transaction enrichment opt-in for all users (#1552)

This commit is contained in:
Zach Gollwitzer
2024-12-17 09:58:08 -05:00
committed by GitHub
parent ba878c3d8b
commit 68617514b0
12 changed files with 46 additions and 35 deletions

View File

@@ -26,10 +26,6 @@ class Settings::HostingsController < SettingsController
Setting.synth_api_key = hosting_params[:synth_api_key]
end
if hosting_params.key?(:data_enrichment_enabled)
Setting.data_enrichment_enabled = hosting_params[:data_enrichment_enabled]
end
redirect_to settings_hosting_path, notice: t(".success")
rescue ActiveRecord::RecordInvalid => error
flash.now[:alert] = t(".failure")
@@ -38,7 +34,7 @@ class Settings::HostingsController < SettingsController
private
def hosting_params
params.require(:setting).permit(:render_deploy_hook, :upgrades_setting, :require_invite_for_signup, :synth_api_key, :data_enrichment_enabled)
params.require(:setting).permit(:render_deploy_hook, :upgrades_setting, :require_invite_for_signup, :synth_api_key)
end
def raise_if_not_self_hosted