From c7bcebd56e264772a8fe177e64476ea7b2b80144 Mon Sep 17 00:00:00 2001 From: Alexander Randa Date: Tue, 20 Jun 2017 09:37:07 +0000 Subject: Fix edit button for deploy keys available from other projects --- lib/api/deploy_keys.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/api') diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb index 7cdee8aced7..d5c2f3d5094 100644 --- a/lib/api/deploy_keys.rb +++ b/lib/api/deploy_keys.rb @@ -86,7 +86,7 @@ module API at_least_one_of :title, :can_push end put ":id/deploy_keys/:key_id" do - key = user_project.deploy_keys.find(params.delete(:key_id)) + key = DeployKey.find(params.delete(:key_id)) authorize!(:update_deploy_key, key) -- cgit v1.2.1