parent
52f44c3ea6
commit
6ec3bad49a
|
@ -248,6 +248,10 @@ def create(**kwargs):
|
||||||
|
|
||||||
cert.owner = kwargs['owner']
|
cert.owner = kwargs['owner']
|
||||||
|
|
||||||
|
# we override the generated name if one is provided
|
||||||
|
if kwargs.get('name'):
|
||||||
|
cert.name = kwargs['name']
|
||||||
|
|
||||||
database.create(cert)
|
database.create(cert)
|
||||||
cert.description = kwargs['description']
|
cert.description = kwargs['description']
|
||||||
g.user.certificates.append(cert)
|
g.user.certificates.append(cert)
|
||||||
|
|
|
@ -201,7 +201,8 @@ class CertificatesList(AuthenticatedResource):
|
||||||
"validityEnd": "2015-06-16T07:00:00.000Z",
|
"validityEnd": "2015-06-16T07:00:00.000Z",
|
||||||
"replacements": [
|
"replacements": [
|
||||||
{'id': 123}
|
{'id': 123}
|
||||||
]
|
],
|
||||||
|
"name": "TestCertificate"
|
||||||
}
|
}
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
|
|
@ -8,11 +8,22 @@
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="email" name="ownerEmail" ng-model="certificate.owner" placeholder="TeamDL@example.com"
|
<input type="email" name="ownerEmail" ng-model="certificate.owner" placeholder="TeamDL@example.com"
|
||||||
tooltip="This is the certificates team distribution list or main point of contact" class="form-control"
|
tooltip="This is the certificates team distribution list or main point of contact"
|
||||||
|
class="form-control"
|
||||||
required/>
|
required/>
|
||||||
|
|
||||||
<p ng-show="trackingForm.ownerEmail.$invalid && !trackingForm.ownerEmail.$pristine" class="help-block">You must
|
<p ng-show="trackingForm.ownerEmail.$invalid && !trackingForm.ownerEmail.$pristine" class="help-block">
|
||||||
enter an Certificate owner</p>
|
You must enter an Certificate owner</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error': trackingForm.name.$invalid, 'has-success': !trackingForm.name.$invalid&&trackingForm.name.$dirty}">
|
||||||
|
<label class="control-label col-sm-2" tooltip="If no name is provided, Lemur will generate a name for you">
|
||||||
|
Custom Name <span class="glyphicon glyphicon-question-sign"></span>
|
||||||
|
</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input name="name" ng-model="certificate.name"
|
||||||
|
placeholder="the.example.net-SymantecCorporation-20150828-20160830" class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group"
|
<div class="form-group"
|
||||||
|
@ -25,7 +36,8 @@
|
||||||
<textarea name="description" ng-model="certificate.description" placeholder="Something elegant"
|
<textarea name="description" ng-model="certificate.description" placeholder="Something elegant"
|
||||||
class="form-control" required></textarea>
|
class="form-control" required></textarea>
|
||||||
|
|
||||||
<p ng-show="trackingForm.description.$invalid && !trackingForm.description.$pristine" class="help-block">You
|
<p ng-show="trackingForm.description.$invalid && !trackingForm.description.$pristine"
|
||||||
|
class="help-block">You
|
||||||
must give a short description about this authority will be used for.</p>
|
must give a short description about this authority will be used for.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,10 +79,12 @@
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input name="commonName"
|
<input name="commonName"
|
||||||
tooltip="If you need a certificate with multiple domains enter your primary domain here and the rest under 'Subject Alternate Names' in the next few panels"
|
tooltip="If you need a certificate with multiple domains enter your primary domain here and the rest under 'Subject Alternate Names' in the next few panels"
|
||||||
ng-model="certificate.commonName" placeholder="Common Name" class="form-control" ng-maxlength="64"
|
ng-model="certificate.commonName" placeholder="Common Name" class="form-control"
|
||||||
|
ng-maxlength="64"
|
||||||
required/>
|
required/>
|
||||||
|
|
||||||
<p ng-show="trackingForm.commonName.$invalid && !trackingForm.commonName.$pristine" class="help-block">You must
|
<p ng-show="trackingForm.commonName.$invalid && !trackingForm.commonName.$pristine" class="help-block">
|
||||||
|
You must
|
||||||
enter a common name and it must be less than 64 characters</p>
|
enter a common name and it must be less than 64 characters</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -124,7 +138,8 @@
|
||||||
Certificate Signing Request (CSR)
|
Certificate Signing Request (CSR)
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea tooltip="Values defined in the CSR will take precedence" name="certificate signing request" ng-model="certificate.csr"
|
<textarea tooltip="Values defined in the CSR will take precedence" name="certificate signing request"
|
||||||
|
ng-model="certificate.csr"
|
||||||
placeholder="PEM encoded string..." class="form-control"
|
placeholder="PEM encoded string..." class="form-control"
|
||||||
ng-pattern="/^-----BEGIN CERTIFICATE REQUEST-----/"></textarea>
|
ng-pattern="/^-----BEGIN CERTIFICATE REQUEST-----/"></textarea>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue