Add cert renewals to audit log
This commit is contained in:
parent
099ec00155
commit
3885c0ad6d
@ -756,7 +756,19 @@ const internalCertificate = {
|
|||||||
.patchAndFetchById(certificate.id, {
|
.patchAndFetchById(certificate.id, {
|
||||||
expires_on: certificateModel.raw('FROM_UNIXTIME(' + cert_info.dates.to + ')')
|
expires_on: certificateModel.raw('FROM_UNIXTIME(' + cert_info.dates.to + ')')
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
|
.then((updated_certificate) => {
|
||||||
|
// Add to audit log
|
||||||
|
return internalAuditLog.add(access, {
|
||||||
|
action: 'renewed',
|
||||||
|
object_type: 'certificate',
|
||||||
|
object_id: updated_certificate.id,
|
||||||
|
meta: updated_certificate
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return certificate;
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
throw new error.ValidationError('Only Let\'sEncrypt certificates can be renewed');
|
throw new error.ValidationError('Only Let\'sEncrypt certificates can be renewed');
|
||||||
}
|
}
|
||||||
|
@ -231,6 +231,7 @@
|
|||||||
"deleted": "Deleted {name}",
|
"deleted": "Deleted {name}",
|
||||||
"enabled": "Enabled {name}",
|
"enabled": "Enabled {name}",
|
||||||
"disabled": "Disabled {name}",
|
"disabled": "Disabled {name}",
|
||||||
|
"renewed": "Renewed {name}",
|
||||||
"meta-title": "Details for Event",
|
"meta-title": "Details for Event",
|
||||||
"view-meta": "View Details",
|
"view-meta": "View Details",
|
||||||
"date": "Date"
|
"date": "Date"
|
||||||
|
Loading…
Reference in New Issue
Block a user