diff --git a/app/controllers/admin/certificates_controller.rb b/app/controllers/admin/certificates_controller.rb index a08654db3..34078aee7 100644 --- a/app/controllers/admin/certificates_controller.rb +++ b/app/controllers/admin/certificates_controller.rb @@ -28,7 +28,7 @@ module Admin end def destroy - if @certificate.destroy + if @certificate.revoke! && @certificate.destroy flash[:notice] = I18n.t('record_deleted') redirect_to admin_api_user_path(@api_user) else diff --git a/app/models/certificate.rb b/app/models/certificate.rb index cb28f629b..212114862 100644 --- a/app/models/certificate.rb +++ b/app/models/certificate.rb @@ -127,6 +127,7 @@ class Certificate < ActiveRecord::Base self.class.update_registry_crl self.class.reload_apache + self end class << self