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
d9cc84ec
Commit
d9cc84ec
authored
Sep 21, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix keys controller
parent
008bf948
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
app/controllers/profiles/keys_controller.rb
app/controllers/profiles/keys_controller.rb
+9
-1
ee/app/controllers/ee/profiles/keys_controller.rb
ee/app/controllers/ee/profiles/keys_controller.rb
+2
-2
No files found.
app/controllers/profiles/keys_controller.rb
View file @
d9cc84ec
class
Profiles::KeysController
<
Profiles
::
ApplicationController
prepend
::
EE
::
Profiles
::
KeysController
skip_before_action
:authenticate_user!
,
only:
[
:get_keys
]
def
index
...
...
@@ -14,7 +16,7 @@ class Profiles::KeysController < Profiles::ApplicationController
@key
=
Keys
::
CreateService
.
new
(
current_user
,
key_params
).
execute
if
@key
.
persisted?
redirect_to
profile_key_path
(
@key
)
redirect_to
_profile_key_path
else
@keys
=
current_user
.
keys
.
select
(
&
:persisted?
)
render
:index
...
...
@@ -50,6 +52,12 @@ class Profiles::KeysController < Profiles::ApplicationController
end
end
protected
def
redirect_to_profile_key_path
redirect_to
profile_key_path
(
@key
)
end
private
def
key_params
...
...
ee/app/controllers/ee/profiles/keys_controller.rb
View file @
d9cc84ec
module
EE
module
Admin
module
Application
sController
module
Profiles
module
Key
sController
protected
def
redirect_to_profile_key_path
...
...
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