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) %>