Commit 02dc7fbf authored by Igor Drozdov's avatar Igor Drozdov Committed by Yorick Peterse

Fix the overriding of EE import params

parent 5dd3b753
......@@ -2,12 +2,7 @@
module ImportUrlParams
def import_url_params
import_params =
params
.require(:project)
.permit(:import_url, :import_url_user, :import_url_password)
{ import_url: import_params_to_full_url(import_params) }
{ import_url: import_params_to_full_url(params[:project]) }
end
def import_params_to_full_url(params)
......
......@@ -14,7 +14,7 @@ class Projects::ImportsController < Projects::ApplicationController
end
def create
if @project.update(import_url_params)
if @project.update(import_params)
@project.import_state.reset.schedule
end
......@@ -66,4 +66,14 @@ class Projects::ImportsController < Projects::ApplicationController
redirect_to project_path(@project)
end
end
def import_params_attributes
[]
end
def import_params
params.require(:project)
.permit(import_params_attributes)
.merge(import_url_params)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment