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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
01b89ee8
Commit
01b89ee8
authored
Mar 03, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `Profile::KeysController#new` action
parent
9db57bc6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
17 deletions
+2
-17
app/controllers/profiles/keys_controller.rb
app/controllers/profiles/keys_controller.rb
+0
-4
app/views/profiles/keys/new.html.haml
app/views/profiles/keys/new.html.haml
+0
-6
app/views/shared/_no_ssh.html.haml
app/views/shared/_no_ssh.html.haml
+1
-1
config/routes.rb
config/routes.rb
+1
-1
spec/routing/routing_spec.rb
spec/routing/routing_spec.rb
+0
-5
No files found.
app/controllers/profiles/keys_controller.rb
View file @
01b89ee8
...
...
@@ -10,10 +10,6 @@ class Profiles::KeysController < Profiles::ApplicationController
@key
=
current_user
.
keys
.
find
(
params
[
:id
])
end
def
new
redirect_to
profile_keys_path
end
def
create
@key
=
current_user
.
keys
.
new
(
key_params
)
...
...
app/views/profiles/keys/new.html.haml
deleted
100644 → 0
View file @
9db57bc6
-
page_title
"Add SSH Keys"
%h3
.page-title
Add an SSH Key
%p
.light
Paste your public key here. Read more about how to generate a key on
#{
link_to
"the SSH help page"
,
help_page_path
(
"ssh"
,
"README"
)
}
.
%hr
=
render
'form'
app/views/shared/_no_ssh.html.haml
View file @
01b89ee8
-
if
cookies
[
:hide_no_ssh_message
].
blank?
&&
!
current_user
.
hide_no_ssh_key
&&
current_user
.
require_ssh_key?
.no-ssh-key-message.alert.alert-warning.hidden-xs
You won't be able to pull or push project code via SSH until you
#{
link_to
'add an SSH key'
,
new_profile_key
_path
,
class:
'alert-link'
}
to your profile
You won't be able to pull or push project code via SSH until you
#{
link_to
'add an SSH key'
,
profile_keys
_path
,
class:
'alert-link'
}
to your profile
.pull-right
=
link_to
"Don't show again"
,
profile_path
(
user:
{
hide_no_ssh_key:
true
}),
method: :put
,
class:
'alert-link'
...
...
config/routes.rb
View file @
01b89ee8
...
...
@@ -314,7 +314,7 @@ Rails.application.routes.draw do
end
end
resource
:preferences
,
only:
[
:show
,
:update
]
resources
:keys
resources
:keys
,
except:
[
:new
]
resources
:emails
,
only:
[
:index
,
:create
,
:destroy
]
resource
:avatar
,
only:
[
:destroy
]
resource
:two_factor_auth
,
only:
[
:new
,
:create
,
:destroy
]
do
...
...
spec/routing/routing_spec.rb
View file @
01b89ee8
...
...
@@ -137,7 +137,6 @@ end
# keys GET /keys(.:format) keys#index
# POST /keys(.:format) keys#create
# new_key GET /keys/new(.:format) keys#new
# edit_key GET /keys/:id/edit(.:format) keys#edit
# key GET /keys/:id(.:format) keys#show
# PUT /keys/:id(.:format) keys#update
...
...
@@ -151,10 +150,6 @@ describe Profiles::KeysController, "routing" do
expect
(
post
(
"/profile/keys"
)).
to
route_to
(
'profiles/keys#create'
)
end
it
"to #new"
do
expect
(
get
(
"/profile/keys/new"
)).
to
route_to
(
'profiles/keys#new'
)
end
it
"to #edit"
do
expect
(
get
(
"/profile/keys/1/edit"
)).
to
route_to
(
'profiles/keys#edit'
,
id:
'1'
)
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