mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 22:54:47 +02:00
Merge pull request #986 from internetee/registry-887-revoke-certificate-before-removing-it
Revoke, and then delete a certificate
This commit is contained in:
commit
e53c7e3fd0
2 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -127,6 +127,7 @@ class Certificate < ActiveRecord::Base
|
|||
|
||||
self.class.update_registry_crl
|
||||
self.class.reload_apache
|
||||
self
|
||||
end
|
||||
|
||||
class << self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue