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
3da7cc51
Commit
3da7cc51
authored
Apr 15, 2020
by
Etienne Baqué
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated controller based on review comments
parent
0ecdf4fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
app/controllers/projects/deploy_keys_controller.rb
app/controllers/projects/deploy_keys_controller.rb
+12
-6
ee/changelogs/unreleased/212775-revert-deploy-keys-move.yml
ee/changelogs/unreleased/212775-revert-deploy-keys-move.yml
+1
-1
No files found.
app/controllers/projects/deploy_keys_controller.rb
View file @
3da7cc51
...
...
@@ -12,7 +12,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
def
index
respond_to
do
|
format
|
format
.
html
{
redirect_to_repository
_settings
(
@project
,
anchor:
'js-deploy-keys-settings'
)
}
format
.
html
{
redirect_to_repository
}
format
.
json
do
render
json:
Projects
::
Settings
::
DeployKeysPresenter
.
new
(
@project
,
current_user:
current_user
).
as_json
end
...
...
@@ -20,7 +20,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
end
def
new
redirect_to_repository
_settings
(
@project
,
anchor:
'js-deploy-keys-settings'
)
redirect_to_repository
end
def
create
...
...
@@ -30,7 +30,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
flash
[
:alert
]
=
@key
.
errors
.
full_messages
.
join
(
', '
).
html_safe
end
redirect_to_repository
_settings
(
@project
,
anchor:
'js-deploy-keys-settings'
)
redirect_to_repository
end
def
edit
...
...
@@ -39,7 +39,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
def
update
if
deploy_key
.
update
(
update_params
)
flash
[
:notice
]
=
_
(
'Deploy key was successfully updated.'
)
redirect_to_repository
_settings
(
@project
,
anchor:
'js-deploy-keys-settings'
)
redirect_to_repository
else
render
'edit'
end
...
...
@@ -51,7 +51,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
return
render_404
unless
key
respond_to
do
|
format
|
format
.
html
{
redirect_to_repository
_settings
(
@project
,
anchor:
'js-deploy-keys-settings'
)
}
format
.
html
{
redirect_to_repository
}
format
.
json
{
head
:ok
}
end
end
...
...
@@ -62,7 +62,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
return
render_404
unless
deploy_key_project
respond_to
do
|
format
|
format
.
html
{
redirect_to_repository
_settings
(
@project
,
anchor:
'js-deploy-keys-settings'
)
}
format
.
html
{
redirect_to_repository
}
format
.
json
{
head
:ok
}
end
end
...
...
@@ -97,4 +97,10 @@ class Projects::DeployKeysController < Projects::ApplicationController
access_denied!
end
end
private
def
redirect_to_repository
redirect_to_repository_settings
(
@project
,
anchor:
'js-deploy-keys-settings'
)
end
end
ee/changelogs/unreleased/212775-revert-deploy-keys-move.yml
View file @
3da7cc51
...
...
@@ -2,4 +2,4 @@
title
:
Move deploy keys section back to repository settings
merge_request
:
29184
author
:
type
:
remov
ed
type
:
chang
ed
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