Merge pull request #986 from internetee/registry-887-revoke-certificate-before-removing-it

Revoke, and then delete a certificate
This commit is contained in:
Timo Võhmar 2018-09-21 13:49:22 +03:00 committed by GitHub
commit e53c7e3fd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -28,6 +28,10 @@ module Admin
end
def destroy
if @certificate.interface == Certificate::REGISTRAR
@certificate.revoke!
end
if @certificate.destroy
flash[:notice] = I18n.t('record_deleted')
redirect_to admin_api_user_path(@api_user)

View file

@ -127,6 +127,7 @@ class Certificate < ActiveRecord::Base
self.class.update_registry_crl
self.class.reload_apache
self
end
class << self