diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2022-11-07 09:59:43 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-11-07 11:45:47 +0100 |
| commit | a779b11a80536d17c6097a8169f009d6597a078e (patch) | |
| tree | f13e2c1202768151553d16de1c51bf38022f81cd | |
| parent | ac259f2d9db8bd79633aee90902c9d865af11a9b (diff) | |
dashboard: temporarily introduce the HandleListEmails option
It will help us gradually deploy the feature.
| -rw-r--r-- | dashboard/app/app_test.go | 6 | ||||
| -rw-r--r-- | dashboard/app/reporting_email.go | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/dashboard/app/app_test.go b/dashboard/app/app_test.go index 3ab0b72e0..87baeaae4 100644 --- a/dashboard/app/app_test.go +++ b/dashboard/app/app_test.go @@ -253,14 +253,16 @@ var testConfig = &GlobalConfig{ Name: "access-user-reporting1", DailyLimit: 1000, Config: &EmailConfig{ - Email: "test@syzkaller.com", + Email: "test@syzkaller.com", + HandleListEmails: true, }, }, { Name: "access-public-reporting2", DailyLimit: 1000, Config: &EmailConfig{ - Email: "test2@syzkaller.com", + Email: "test2@syzkaller.com", + HandleListEmails: true, }, }, }, diff --git a/dashboard/app/reporting_email.go b/dashboard/app/reporting_email.go index 63381acc2..ea25721b3 100644 --- a/dashboard/app/reporting_email.go +++ b/dashboard/app/reporting_email.go @@ -65,6 +65,7 @@ var mailingLists map[string]bool type EmailConfig struct { Email string + HandleListEmails bool // This is a temporary option to simplify the feature deployment. MailMaintainers bool DefaultMaintainers []string SubjectPrefix string @@ -512,6 +513,10 @@ func matchBugFromList(c context.Context, sender, subject string) (*bugInfoResult log.Infof(c, "reporting is not EmailConfig (%q)", subject) continue } + if !emailConfig.HandleListEmails { + log.Infof(c, "the feature is disabled for the config") + continue + } if emailConfig.Email != sender { log.Infof(c, "config's Email is %v, wanted %v", emailConfig.Email, sender) continue |
