diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-12 08:59:28 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 16:43:37 +0300 |
commit | 027309eb2ae54614a2ee1a0ca9e4cea76a86b94b (patch) | |
tree | d5479187f2a89e2a24e5a62044861effd05b841c /app/controllers/profiles/gpg_keys_controller.rb | |
parent | 111edaa9f75f402cc18c2bec5cab9aa6615d9c4d (diff) |
user may now revoke a gpg key
other than just removing a key, which doesn't affect the verified state
of a commit, revoking a key unverifies all signed commits.
Diffstat (limited to 'app/controllers/profiles/gpg_keys_controller.rb')
-rw-r--r-- | app/controllers/profiles/gpg_keys_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/profiles/gpg_keys_controller.rb b/app/controllers/profiles/gpg_keys_controller.rb index b04c14a6993..3e75247769d 100644 --- a/app/controllers/profiles/gpg_keys_controller.rb +++ b/app/controllers/profiles/gpg_keys_controller.rb @@ -25,6 +25,16 @@ class Profiles::GpgKeysController < Profiles::ApplicationController end end + def revoke + @gpp_key = current_user.gpg_keys.find(params[:id]) + @gpp_key.revoke + + respond_to do |format| + format.html { redirect_to profile_gpg_keys_url, status: 302 } + format.js { head :ok } + end + end + private def gpg_key_params |