diff options
author | Rémy Coutable <remy@rymai.me> | 2018-12-18 17:40:05 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-12-19 18:02:01 +0100 |
commit | fa7ed15df69a9ed7bb7c9442aac1e379585e3ff1 (patch) | |
tree | ac51eaa37bfdb95a5ad0ce2ac12a1f11fa81b820 /app | |
parent | becfb66213ba7aab8e9b8bb620d767884d548978 (diff) | |
download | gitlab-ce-fa7ed15df69a9ed7bb7c9442aac1e379585e3ff1.tar.gz |
Make Projects::DeployKeysController EE-ready
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/deploy_keys_controller.rb | 2 | ||||
-rw-r--r-- | app/services/deploy_keys/create_service.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/deploy_keys_controller.rb b/app/controllers/projects/deploy_keys_controller.rb index 0a593bd35b6..6824a07dc76 100644 --- a/app/controllers/projects/deploy_keys_controller.rb +++ b/app/controllers/projects/deploy_keys_controller.rb @@ -24,7 +24,7 @@ class Projects::DeployKeysController < Projects::ApplicationController end def create - @key = DeployKeys::CreateService.new(current_user, create_params).execute + @key = DeployKeys::CreateService.new(current_user, create_params).execute(project: @project) unless @key.valid? flash[:alert] = @key.errors.full_messages.join(', ').html_safe diff --git a/app/services/deploy_keys/create_service.rb b/app/services/deploy_keys/create_service.rb index a25e73666f8..0c935285657 100644 --- a/app/services/deploy_keys/create_service.rb +++ b/app/services/deploy_keys/create_service.rb @@ -2,7 +2,7 @@ module DeployKeys class CreateService < Keys::BaseService - def execute + def execute(project: nil) DeployKey.create(params.merge(user: user)) end end |