Skip to content

Fix NameError Admin::ApplicationSettings::UpdateService

Serena Fang requested to merge fix-admin-application-settings-controller into master

What does this MR do?

When updating Admin application settings, I ran into this 500 error: NameError - uninitialized constant Admin::ApplicationSettings::UpdateService.

This is because app/controllers/admin/application_settings_controller.rb#perform_update is currently calling Admin::ApplicationSettings::UpdateService which does not exist, instead of ::ApplicationSettings::UpdateService. This MR fixes the 500 error by calling the correct class.

Processing by Admin::ApplicationSettingsController#reporting as HTML
  Parameters: {"authenticity_token"=>"[FILTERED]", "application_setting"=>{"recaptcha_enabled"=>"1", "login_recaptcha_protection_enabled"=>"1", "recaptcha_site_key"=>"[FILTERED]", "recaptcha_private_key"=>"[FILTERED]", "invisible_captcha_enabled"=>"0", "akismet_enabled"=>"0", "akismet_api_key"=>"[FILTERED]", "unique_ips_limit_enabled"=>"0", "unique_ips_limit_per_user"=>"10", "unique_ips_limit_time_window"=>"3600", "spam_check_endpoint_enabled"=>"0", "spam_check_endpoint_url"=>"", "spam_check_api_key"=>"[FILTERED]"}}

Completed 500 Internal Server Error in 137ms (ActiveRecord: 28.7ms | Elasticsearch: 0.0ms | Allocations: 61804)

NameError - uninitialized constant Admin::ApplicationSettings::UpdateService
Did you mean?  UpdateHighestRole:
  app/controllers/admin/application_settings_controller.rb:256:in `perform_update'

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Serena Fang

Merge request reports

Loading