summaryrefslogtreecommitdiff
path: root/app/controllers/admin/services_controller.rb
diff options
context:
space:
mode:
authorAlex Lossent <alexandre.lossent@cern.ch>2015-10-15 09:09:01 +0200
committerAlex Lossent <alexandre.lossent@cern.ch>2015-10-15 12:07:59 +0200
commit98e666ab6a61ef67c2ba15d31839fd1cf414d587 (patch)
treeabcf4f46204ff31e353c110b5a86c6035eaa3094 /app/controllers/admin/services_controller.rb
parent976400c1e6c653ce93cd29d32a007c091a38f970 (diff)
downloadgitlab-ce-98e666ab6a61ef67c2ba15d31839fd1cf414d587.tar.gz
Improve invalidation of stored service password if the endpoint URL is changedimprove_reset_service_password_v2
Password can now be specified at the same time as the new URL, and the service template admin pages now work.
Diffstat (limited to 'app/controllers/admin/services_controller.rb')
-rw-r--r--app/controllers/admin/services_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb
index a62170662e1..46133588332 100644
--- a/app/controllers/admin/services_controller.rb
+++ b/app/controllers/admin/services_controller.rb
@@ -39,7 +39,13 @@ class Admin::ServicesController < Admin::ApplicationController
end
def application_services_params
- params.permit(:id,
+ application_services_params = params.permit(:id,
service: Projects::ServicesController::ALLOWED_PARAMS)
+ if application_services_params[:service].is_a?(Hash)
+ Projects::ServicesController::FILTER_BLANK_PARAMS.each do |param|
+ application_services_params[:service].delete(param) if application_services_params[:service][param].blank?
+ end
+ end
+ application_services_params
end
end