summaryrefslogtreecommitdiff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authorAlex Lossent <alexandre.lossent@cern.ch>2015-10-13 11:29:57 +0200
committerAlex Lossent <alexandre.lossent@cern.ch>2015-10-14 15:27:59 +0200
commitb46397548056e4e8ef00efe4f641c61ba1dd5230 (patch)
tree1f5795dfdc3ef417dced3a797c0ec7e83551cf0e /app/controllers/admin
parent07101cfab61f28c6328efebea98f018ab8356cdd (diff)
downloadgitlab-ce-b46397548056e4e8ef00efe4f641c61ba1dd5230.tar.gz
Improve invalidation of stored service password if the endpoint URL is changed
It now allows to specify a password at the same time as the new URL, and works on the service template admin pages.
Diffstat (limited to 'app/controllers/admin')
-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