From 39d65b2597b619039715267a0cbd7ba7ed1ee278 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 07:46:36 -0400 Subject: [PATCH] feat: add show_support_links UI visibility toggle to hide support section (#25) Co-authored-by: Bob Develop --- app/models/account_config.rb | 1 + .../personalization_settings/_ui_visibility_form.html.erb | 3 ++- app/views/shared/_settings_nav.html.erb | 2 +- config/locales/i18n.yml | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/account_config.rb b/app/models/account_config.rb index d0826af0..df466418 100644 --- a/app/models/account_config.rb +++ b/app/models/account_config.rb @@ -63,6 +63,7 @@ class AccountConfig < ApplicationRecord SHOW_CONSOLE_LINK_KEY = 'show_console_link' SHOW_API_LINK_KEY = 'show_api_link' SHOW_TEST_MODE_KEY = 'show_test_mode' + SHOW_SUPPORT_LINKS_KEY = 'show_support_links' BRAND_NAME_KEY = 'brand_name' BRAND_NAME_FONT_KEY = 'brand_name_font' IP_ALLOWLIST_KEY = 'ip_allowlist' diff --git a/app/views/personalization_settings/_ui_visibility_form.html.erb b/app/views/personalization_settings/_ui_visibility_form.html.erb index 47d66a5b..cfc6c01f 100644 --- a/app/views/personalization_settings/_ui_visibility_form.html.erb +++ b/app/views/personalization_settings/_ui_visibility_form.html.erb @@ -3,7 +3,8 @@ <% [ [AccountConfig::SHOW_CONSOLE_LINK_KEY, t('show_console_link')], [AccountConfig::SHOW_API_LINK_KEY, t('show_api_link')], - [AccountConfig::SHOW_TEST_MODE_KEY, t('show_test_mode')] + [AccountConfig::SHOW_TEST_MODE_KEY, t('show_test_mode')], + [AccountConfig::SHOW_SUPPORT_LINKS_KEY, t('show_support_links')] ].each do |key, label| %> <% env_var_name = "DOCUSEAL_CONFIG_#{key.upcase}" %> <% locked = ENV.fetch(env_var_name, nil).present? %> diff --git a/app/views/shared/_settings_nav.html.erb b/app/views/shared/_settings_nav.html.erb index 7ca46214..5340bf49 100644 --- a/app/views/shared/_settings_nav.html.erb +++ b/app/views/shared/_settings_nav.html.erb @@ -105,7 +105,7 @@ <% end %> - <% if Docuseal.multitenant? || cannot?(:manage, :tenants) %> + <% if (Docuseal.multitenant? || cannot?(:manage, :tenants)) && current_account.ui_visible?(AccountConfig::SHOW_SUPPORT_LINKS_KEY) %>