Adding the ability to silence notifications on creation. (#490)

This commit is contained in:
kevgliss 2016-11-12 09:29:42 -08:00 committed by GitHub
parent 0334f1094d
commit 114deba06e
3 changed files with 4 additions and 0 deletions

View File

@ -103,6 +103,7 @@ class Certificate(db.Model):
if kwargs.get('chain'): if kwargs.get('chain'):
self.chain = kwargs['chain'].strip() self.chain = kwargs['chain'].strip()
self.notify = kwargs.get('notify', True)
self.destinations = kwargs.get('destinations', []) self.destinations = kwargs.get('destinations', [])
self.notifications = kwargs.get('notifications', []) self.notifications = kwargs.get('notifications', [])
self.description = kwargs.get('description') self.description = kwargs.get('description')

View File

@ -59,6 +59,8 @@ class CertificateInputSchema(CertificateCreationSchema):
csr = fields.String(validate=validators.csr) csr = fields.String(validate=validators.csr)
notify = fields.Boolean(default=True)
# certificate body fields # certificate body fields
organizational_unit = fields.String(missing=lambda: current_app.config.get('LEMUR_DEFAULT_ORGANIZATIONAL_UNIT')) organizational_unit = fields.String(missing=lambda: current_app.config.get('LEMUR_DEFAULT_ORGANIZATIONAL_UNIT'))
organization = fields.String(missing=lambda: current_app.config.get('LEMUR_DEFAULT_ORGANIZATION')) organization = fields.String(missing=lambda: current_app.config.get('LEMUR_DEFAULT_ORGANIZATION'))

View File

@ -167,6 +167,7 @@ class CertificatesList(AuthenticatedResource):
"replacements": [{ "replacements": [{
"id": 1 "id": 1
}, },
"notify": true,
"validityEnd": "2026-01-01T08:00:00.000Z", "validityEnd": "2026-01-01T08:00:00.000Z",
"authority": { "authority": {
"name": "verisign" "name": "verisign"