MM-18818 Prompt admins to set the Support Email (#17296)
* MM-18818 Set default support to empty and handled the same in email templates * #MM-18818 Admin advisor now warns for inconfigured support email address * Updated text * #MM-18818 gofmt'ed files * #MM-18818 updated text and removed unused i18n strings: * #MM-18818 updated i18n string ordering * #MM-18818 Added test for support email advisory * MM-18818 gofmt'd the file * MM-18818 separated contextual notifications from configuration notifications in Admin Advisor * #MM-18818 prevented support email with whitepsaces from being detected as filled Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dc7a425e77
Коммит
79dd9b13dc
@@ -1422,6 +1422,13 @@ func runCheckWarnMetricStatusJob(a *App) {
|
||||
}, time.Hour*model.WARN_METRIC_JOB_INTERVAL)
|
||||
}
|
||||
|
||||
func runCheckAdminSupportStatusJob(a *App) {
|
||||
doCheckAdminSupportStatus(a)
|
||||
model.CreateRecurringTask("Check Admin Support Status Job", func() {
|
||||
doCheckAdminSupportStatus(a)
|
||||
}, time.Hour*model.WARN_METRIC_JOB_INTERVAL)
|
||||
}
|
||||
|
||||
func doSecurity(s *Server) {
|
||||
s.DoSecurityUpdateCheck()
|
||||
}
|
||||
@@ -1586,6 +1593,16 @@ func doCheckWarnMetricStatus(a *App) {
|
||||
}
|
||||
}
|
||||
|
||||
func doCheckAdminSupportStatus(a *App) {
|
||||
isE0Edition := model.BuildEnterpriseReady == "true"
|
||||
|
||||
if strings.TrimSpace(*a.Config().SupportSettings.SupportEmail) == model.SUPPORT_SETTINGS_DEFAULT_SUPPORT_EMAIL {
|
||||
if err := a.notifyAdminsOfWarnMetricStatus(model.SYSTEM_METRIC_SUPPORT_EMAIL_NOT_CONFIGURED, isE0Edition); err != nil {
|
||||
mlog.Error("Failed to send notifications to admin users.", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Server) StopMetricsServer() {
|
||||
s.metricsLock.Lock()
|
||||
defer s.metricsLock.Unlock()
|
||||
|
||||
Ссылка в новой задаче
Block a user