Skip to content

Commit b3ee296

Browse files
committed
fix aggregate email alert
1 parent c5104a5 commit b3ee296

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

cloud_governance/common/mails/postfix.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,8 @@ def send_email_postfix(self, subject: str, to: any, cc: list, content: str, **kw
156156
to = self.__mail_to
157157
if self.__mail_cc:
158158
cc = self.__mail_cc
159-
to = "yinsong@redhat.com"
160-
cc = []
161159
if not self.__ldap_search.get_user_details(user_name=to):
162-
cc.append('yinsong@redhat.com')
160+
cc.extend(self.__default_admins)
163161
response = {'ok': True}
164162
to = self.prettify_to(to)
165163
cc = self.prettify_cc(cc)

cloud_governance/main/environment_variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def __init__(self):
277277
self._environment_variables_dict['POLICY_ACTIONS_DAYS'] = literal_eval(
278278
EnvironmentVariables.get_env('POLICY_ACTIONS_DAYS', '[]'))
279279
self._environment_variables_dict['DEFAULT_ADMINS'] = literal_eval(
280-
EnvironmentVariables.get_env('DEFAULT_ADMINS', '[]'))
280+
EnvironmentVariables.get_env('DEFAULT_ADMINS', '["yinsong@redhat.com", "ebattat@redhat.com"]'))
281281
self._environment_variables_dict['KERBEROS_USERS'] = literal_eval(
282282
EnvironmentVariables.get_env('KERBEROS_USERS', '[]'))
283283
self._environment_variables_dict['POLICIES_TO_ALERT'] = literal_eval(

0 commit comments

Comments
 (0)