From 10fd79745df7b572fc79fd84b58e818e64bf2571 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 16 Jun 2020 15:08:32 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/api/users.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/api/users.rb') diff --git a/lib/api/users.rb b/lib/api/users.rb index 2b2c753cfc1..3d8ae09edf1 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -306,7 +306,10 @@ module API key = user.keys.find_by(id: params[:key_id]) not_found!('Key') unless key - destroy_conditionally!(key) + destroy_conditionally!(key) do |key| + destroy_service = ::Keys::DestroyService.new(current_user) + destroy_service.execute(key) + end end # rubocop: enable CodeReuse/ActiveRecord -- cgit v1.2.1