mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 07:34:45 +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
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
if @certificate.interface == Certificate::REGISTRAR
|
||||||
|
@certificate.revoke!
|
||||||
|
end
|
||||||
|
|
||||||
if @certificate.destroy
|
if @certificate.destroy
|
||||||
flash[:notice] = I18n.t('record_deleted')
|
flash[:notice] = I18n.t('record_deleted')
|
||||||
redirect_to admin_api_user_path(@api_user)
|
redirect_to admin_api_user_path(@api_user)
|
||||||
|
|
|
@ -127,6 +127,7 @@ class Certificate < ActiveRecord::Base
|
||||||
|
|
||||||
self.class.update_registry_crl
|
self.class.update_registry_crl
|
||||||
self.class.reload_apache
|
self.class.reload_apache
|
||||||
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue