Only revoke registrar certificates

This commit is contained in:
Maciej Szlosarczyk 2018-09-20 16:08:00 +03:00
parent 240bcf7911
commit d77bdee599
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765

View file

@ -28,7 +28,11 @@ module Admin
end
def destroy
if @certificate.revoke! && @certificate.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)
else