Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/profiles/keys_controller.rb')
-rw-r--r--app/controllers/profiles/keys_controller.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/controllers/profiles/keys_controller.rb b/app/controllers/profiles/keys_controller.rb
index 39e8f6c500d..31c758ac763 100644
--- a/app/controllers/profiles/keys_controller.rb
+++ b/app/controllers/profiles/keys_controller.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class Profiles::KeysController < Profiles::ApplicationController
- feature_category :users
+ feature_category :user_profile
urgency :low, [:create, :index]
def index
@@ -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