Adds an optional interval variable to notification service's

create_default_expiration_notifications and introduces a new optional
configuration variable, LEMUR_SECURITY_TEAM_EMAIL_INTERVALS, to allow admins
control over the centralized email notification defaults.
This commit is contained in:
Steven Reiling
2018-07-13 13:34:43 -07:00
parent 4922f4dd40
commit 7f3454128d
3 changed files with 18 additions and 6 deletions

View File

@ -48,9 +48,11 @@ class CertificateCreationSchema(CertificateSchema):
"DEFAULT_{0}".format(data['owner'].split('@')[0].upper()),
[data['owner']],
)
data['notifications'] += notification_service.create_default_expiration_notifications(
'DEFAULT_SECURITY',
current_app.config.get('LEMUR_SECURITY_TEAM_EMAIL')
current_app.config.get('LEMUR_SECURITY_TEAM_EMAIL'),
current_app.config.get('LEMUR_SECURITY_TEAM_EMAIL_INTERVALS', None)
)
return data