diff options
author | Andrei Gliga <otzy_007@yahoo.com> | 2016-05-04 13:08:06 +0300 |
---|---|---|
committer | Andrei Gliga <otzy_007@yahoo.com> | 2016-05-12 13:44:46 +0300 |
commit | e5ddd6d21eb6125605d3f47ea5db884b54514796 (patch) | |
tree | 4deeb23951a4d934274b127f2c44a1d49cb251a2 /app | |
parent | ca288587256b8995105b601ef02850f388d59ff9 (diff) | |
download | gitlab-ce-e5ddd6d21eb6125605d3f47ea5db884b54514796.tar.gz |
disabled_oauth_sign_in_sources parameter handling in ApplicationSettingsController
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index ec22548ddeb..cebc01a2afc 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -53,6 +53,15 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController end end + disabled_oauth_sign_in_sources = params[:application_setting][:disabled_oauth_sign_in_sources] + if disabled_oauth_sign_in_sources.nil? + params[:application_setting][:disabled_oauth_sign_in_sources] = [] + else + disabled_oauth_sign_in_sources.map! do |source| + source.to_str + end + end + params.require(:application_setting).permit( :default_projects_limit, :default_branch_protection, @@ -95,7 +104,8 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :repository_checks_enabled, :metrics_packet_size, restricted_visibility_levels: [], - import_sources: [] + import_sources: [], + disabled_oauth_sign_in_sources: [] ) end end |