parent
52f44c3ea6
commit
6ec3bad49a
@ -248,6 +248,10 @@ def create(**kwargs):
|
||||
|
||||
cert.owner = kwargs['owner']
|
||||
|
||||
# we override the generated name if one is provided
|
||||
if kwargs.get('name'):
|
||||
cert.name = kwargs['name']
|
||||
|
||||
database.create(cert)
|
||||
cert.description = kwargs['description']
|
||||
g.user.certificates.append(cert)
|
||||
|
@ -201,7 +201,8 @@ class CertificatesList(AuthenticatedResource):
|
||||
"validityEnd": "2015-06-16T07:00:00.000Z",
|
||||
"replacements": [
|
||||
{'id': 123}
|
||||
]
|
||||
],
|
||||
"name": "TestCertificate"
|
||||
}
|
||||
|
||||
**Example response**:
|
||||
|
@ -8,11 +8,22 @@
|
||||
|
||||
<div class="col-sm-10">
|
||||
<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/>
|
||||
|
||||
<p ng-show="trackingForm.ownerEmail.$invalid && !trackingForm.ownerEmail.$pristine" class="help-block">You must
|
||||
enter an Certificate owner</p>
|
||||
<p ng-show="trackingForm.ownerEmail.$invalid && !trackingForm.ownerEmail.$pristine" class="help-block">
|
||||
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 class="form-group"
|
||||
@ -25,7 +36,8 @@
|
||||
<textarea name="description" ng-model="certificate.description" placeholder="Something elegant"
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
@ -67,10 +79,12 @@
|
||||
<div class="col-sm-10">
|
||||
<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"
|
||||
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/>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@ -124,7 +138,8 @@
|
||||
Certificate Signing Request (CSR)
|
||||
</label>
|
||||
<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"
|
||||
ng-pattern="/^-----BEGIN CERTIFICATE REQUEST-----/"></textarea>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user