Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Lossent <alexandre.lossent@cern.ch>2015-10-13 12:29:57 +0300
committerAlex Lossent <alexandre.lossent@cern.ch>2015-10-14 16:27:59 +0300
commitb46397548056e4e8ef00efe4f641c61ba1dd5230 (patch)
tree1f5795dfdc3ef417dced3a797c0ec7e83551cf0e /app/controllers/admin/services_controller.rb
parent07101cfab61f28c6328efebea98f018ab8356cdd (diff)
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/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