From df4364714e5069a96353753c80e08cab317c9a4b Mon Sep 17 00:00:00 2001 From: kevgliss Date: Mon, 23 Nov 2015 09:53:55 -0800 Subject: [PATCH] Closes #139 --- lemur/authorities/service.py | 10 +++++++++- .../static/app/angular/certificates/view/view.tpl.html | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lemur/authorities/service.py b/lemur/authorities/service.py index 5a1f4341..7d825c78 100644 --- a/lemur/authorities/service.py +++ b/lemur/authorities/service.py @@ -58,7 +58,15 @@ def create(kwargs): cert = Certificate(cert_body, chain=intermediate) cert.owner = kwargs['ownerEmail'] - cert.description = "This is the ROOT certificate for the {0} certificate authority".format(kwargs.get('caName')) + + if kwargs['caType'] == 'subca': + cert.description = "This is the ROOT certificate for the {0} sub certificate authority the parent \ + authority is {1}.".format(kwargs.get('caName'), kwargs.get('caParent')) + else: + cert.description = "This is the ROOT certificate for the {0} certificate authority.".format( + kwargs.get('caName') + ) + cert.user = g.current_user cert.notifications = notification_service.create_default_expiration_notifications( diff --git a/lemur/static/app/angular/certificates/view/view.tpl.html b/lemur/static/app/angular/certificates/view/view.tpl.html index 9d0f726f..dc5ea575 100644 --- a/lemur/static/app/angular/certificates/view/view.tpl.html +++ b/lemur/static/app/angular/certificates/view/view.tpl.html @@ -109,7 +109,7 @@
  • Description - {{ certificate.description }} +

    {{ certificate.description }}