Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
02dc7fbf
Commit
02dc7fbf
authored
May 29, 2019
by
Igor Drozdov
Committed by
Yorick Peterse
May 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the overriding of EE import params
parent
5dd3b753
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
app/controllers/concerns/import_url_params.rb
app/controllers/concerns/import_url_params.rb
+1
-6
app/controllers/projects/imports_controller.rb
app/controllers/projects/imports_controller.rb
+11
-1
No files found.
app/controllers/concerns/import_url_params.rb
View file @
02dc7fbf
...
...
@@ -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
)
...
...
app/controllers/projects/imports_controller.rb
View file @
02dc7fbf
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment