Commit 257a61e8 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'reduce-imports_controller-diff-with-ce' into 'master'

Make Projects::ImportsController EE-compatible

See merge request gitlab-org/gitlab-ce!23883
parents 9e26728c 6db49cfe
......@@ -13,7 +13,7 @@ class Projects::ImportsController < Projects::ApplicationController
end
def create
if @project.update(safe_import_params)
if @project.update(import_params)
@project.import_state.reload.schedule
end
......@@ -66,11 +66,11 @@ class Projects::ImportsController < Projects::ApplicationController
end
end
def import_params
params.require(:project).permit(:import_url)
def import_params_attributes
[:import_url]
end
def safe_import_params
import_params
def import_params
params.require(:project).permit(import_params_attributes)
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