Unable to access application settings after upgrading from 8.7.2 to 8.8
Trying to access /admin/application_settings
fails with an error 500. Today I upgraded via source to 8-8-stable
(8.8.0-rc1
) .
Log:
Started GET "/admin/application_settings" for 0.0.0.0 at 2016-05-16 17:20:08 +0200
Processing by Admin::ApplicationSettingsController#show as HTML
Completed 500 Internal Server Error in 164ms (ActiveRecord: 3.6ms)
ActionView::Template::Error (undefined method `include?' for nil:NilClass):
114: = f.label :enabled_oauth_sign_in_sources, 'Enabled OAuth Sign-In sources', class: 'control-label col-sm-2'
115: .col-sm-10
116: .btn-group{ data: { toggle: 'buttons' } }
117: - oauth_providers_checkboxes.each do |source|
118: = source
119: .form-group
120: = f.label :two_factor_authentication, 'Two-factor authentication', class: 'control-label col-sm-2'
app/helpers/application_settings_helper.rb:66:in `block in oauth_providers_checkboxes'
app/helpers/application_settings_helper.rb:65:in `map'
app/helpers/application_settings_helper.rb:65:in `oauth_providers_checkboxes'
app/views/admin/application_settings/_form.html.haml:117:in `block in _app_views_admin_application_settings__form_html_haml___4012359653042722066_70194139384980'
app/views/admin/application_settings/_form.html.haml:1:in `_app_views_admin_application_settings__form_html_haml___4012359653042722066_70194139384980'
app/views/admin/application_settings/show.html.haml:4:in `_app_views_admin_application_settings_show_html_haml___930311320739131165_70194139327520'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/middleware/static.rb:9:in `call'
Maybe this was introduced with !4034 (merged) ?
As a workaround I added a nil check in app/helpers/application_settings_helper.rb
in line 66:
disabled = current_application_settings.disabled_oauth_sign_in_sources.present? && current_application_settings.disabled_oauth_sign_in_sources.include?(source.to_s)