diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-24 15:07:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-24 15:07:34 +0000 |
commit | df9890e9a702e2f12bbc8f022b916ca72820a292 (patch) | |
tree | 26ff255cfb6843fe963fcafea9ee70121ee5e913 /app/controllers/profiles | |
parent | 17c1c66eefd05243dd8ed2c8fd49d17ab1a52522 (diff) | |
download | gitlab-ce-df9890e9a702e2f12bbc8f022b916ca72820a292.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/keys_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/profiles/keys_controller.rb b/app/controllers/profiles/keys_controller.rb index d0c2dc26fa6..31c758ac763 100644 --- a/app/controllers/profiles/keys_controller.rb +++ b/app/controllers/profiles/keys_controller.rb @@ -34,6 +34,16 @@ class Profiles::KeysController < Profiles::ApplicationController end end + def revoke + @key = current_user.keys.find(params[:id]) + Keys::RevokeService.new(current_user).execute(@key) + + respond_to do |format| + format.html { redirect_to profile_keys_url, status: :found } + format.js { head :ok } + end + end + private def key_params |