diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-16 15:08:32 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-16 15:08:32 +0000 |
commit | 10fd79745df7b572fc79fd84b58e818e64bf2571 (patch) | |
tree | a89151d08c7a13334843b3a6f9010c00acabcb2b /lib/api/users.rb | |
parent | 9bfdb5cf67ca45ac6d354e18168f5df12b60ccd2 (diff) | |
download | gitlab-ce-10fd79745df7b572fc79fd84b58e818e64bf2571.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r-- | lib/api/users.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |