summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-01 16:44:54 -0700
committerStan Hu <stanhu@gmail.com>2019-07-01 22:23:01 -0700
commit045ab84e0b54dd2b8c03d281a8d4f9c15ae26a6e (patch)
tree3103be220ae55e425f2a1858fc63c45d3b5690ae /app/helpers
parent07f879f8909572a13256b8a7c5d8cf3c9d16a230 (diff)
downloadgitlab-ce-045ab84e0b54dd2b8c03d281a8d4f9c15ae26a6e.tar.gz
Fix broken specs due to cached application settings
The /admin panel will now always return an uncached application setting to ensure it always has the most current info.
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_settings_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb
index aaaa954047f..a7a4e945a99 100644
--- a/app/helpers/application_settings_helper.rb
+++ b/app/helpers/application_settings_helper.rb
@@ -69,7 +69,7 @@ module ApplicationSettingsHelper
# toggle button effect.
def import_sources_checkboxes(help_block_id, options = {})
Gitlab::ImportSources.options.map do |name, source|
- checked = Gitlab::CurrentSettings.import_sources.include?(source)
+ checked = @application_setting.import_sources.include?(source)
css_class = checked ? 'active' : ''
checkbox_name = 'application_setting[import_sources][]'
@@ -85,7 +85,7 @@ module ApplicationSettingsHelper
def oauth_providers_checkboxes
button_based_providers.map do |source|
- disabled = Gitlab::CurrentSettings.disabled_oauth_sign_in_sources.include?(source.to_s)
+ disabled = @application_setting.disabled_oauth_sign_in_sources.include?(source.to_s)
css_class = ['btn']
css_class << 'active' unless disabled
checkbox_name = 'application_setting[enabled_oauth_sign_in_sources][]'