CRL Reason for certificate revoke
This commit is contained in:
@ -419,8 +419,8 @@ angular.module('lemur')
|
||||
$uibModalInstance.dismiss('cancel');
|
||||
};
|
||||
|
||||
$scope.revoke = function (certificate) {
|
||||
CertificateService.revoke(certificate).then(
|
||||
$scope.revoke = function (certificate, crlReason) {
|
||||
CertificateService.revoke(certificate, crlReason).then(
|
||||
function () {
|
||||
toaster.pop({
|
||||
type: 'success',
|
||||
|
@ -4,13 +4,13 @@
|
||||
<h3 class="modal-title">Revoke <span class="text-muted"><small>{{ certificate.name }}</small></span></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="revokeForm" ng-if="!certificate.endpoints.length" novalidate>
|
||||
<form name="revokeForm" novalidate>
|
||||
<p><strong>Certificate revocation is final. Once revoked the certificate is no longer valid.</strong></p>
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error': revokeForm.confirm.$invalid, 'has-success': !revokeForm.$invalid&&revokeForm.confirm.$dirty}">
|
||||
<label class="control-label col-sm-2">
|
||||
Confirm Revocation
|
||||
Confirm Certificate Name
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input name="confirm" ng-model="confirm" placeholder='{{ certificate.name }}'
|
||||
@ -23,6 +23,27 @@
|
||||
You must confirm certificate revocation.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">
|
||||
Reason
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" ng-model="crlReason"
|
||||
ng-options="option.value as option.name for option in [
|
||||
{'name': 'Unspecified', 'value': 'unspecified'},
|
||||
{'name': 'Key Compromise', 'value': 'keyCompromise'},
|
||||
{'name': 'CA Compromise', 'value': 'cACompromise'},
|
||||
{'name': 'Affiliation Changed', 'value': 'affiliationChanged'},
|
||||
{'name': 'Superseded', 'value': 'superseded'},
|
||||
{'name': 'Cessation of Operation', 'value': 'cessationOfOperation'},
|
||||
{'name': 'Certificate Hold', 'value': 'certificateHold'},
|
||||
{'name': 'Remove from CRL', 'value': 'removeFromCRL'},
|
||||
{'name': 'Privilege Withdrawn', 'value': 'privilegeWithdrawn'},
|
||||
{'name': 'Attribute Authority Compromise', 'value': 'aACompromise'}]"
|
||||
|
||||
ng-init="crlReason = 'unspecified'"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div ng-if="certificate.endpoints.length">
|
||||
@ -40,7 +61,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" ng-click="revoke(certificate)" ng-disabled="revokeForm.confirm.$invalid"
|
||||
<button type="submit" ng-click="revoke(certificate, crlReason)" ng-disabled="revokeForm.confirm.$invalid"
|
||||
class="btn btn-danger">Revoke
|
||||
</button>
|
||||
<button ng-click="cancel()" class="btn">Cancel</button>
|
||||
|
@ -313,8 +313,8 @@ angular.module('lemur')
|
||||
return certificate.customPOST(certificate.exportOptions, 'export');
|
||||
};
|
||||
|
||||
CertificateService.revoke = function (certificate) {
|
||||
return certificate.customPUT({}, 'revoke');
|
||||
CertificateService.revoke = function (certificate, crlReason) {
|
||||
return certificate.customPUT({'crlReason':crlReason}, 'revoke');
|
||||
};
|
||||
|
||||
return CertificateService;
|
||||
|
Reference in New Issue
Block a user