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
9d713a8f
Commit
9d713a8f
authored
Aug 13, 2016
by
Ruben Davila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken specs for DeployKeysController.
parent
1301572a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
app/controllers/projects/deploy_keys_controller.rb
app/controllers/projects/deploy_keys_controller.rb
+7
-2
No files found.
app/controllers/projects/deploy_keys_controller.rb
View file @
9d713a8f
...
...
@@ -29,14 +29,15 @@ class Projects::DeployKeysController < Projects::ApplicationController
end
def
enable
lo
g_audit_event
(
@key
.
title
,
action: :create
)
lo
ad_key
Projects
::
EnableDeployKeyService
.
new
(
@project
,
current_user
,
params
).
execute
log_audit_event
(
@key
.
title
,
action: :create
)
redirect_to
namespace_project_deploy_keys_path
(
@project
.
namespace
,
@project
)
end
def
disable
@key
=
accessible_keys
.
find
(
params
[
:id
])
load_key
@project
.
deploy_keys_projects
.
find_by
(
deploy_key_id:
params
[
:id
]).
destroy
log_audit_event
(
@key
.
title
,
action: :destroy
)
...
...
@@ -65,4 +66,8 @@ class Projects::DeployKeysController < Projects::ApplicationController
AuditEventService
.
new
(
current_user
,
@project
,
options
).
for_deploy_key
(
key_title
).
security_event
end
def
load_key
@key
||=
current_user
.
accessible_deploy_keys
.
find
(
params
[
:id
])
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