fix(api): platform check type switch binds the platform's checkers only
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 11m25s
ci / test (pull_request) Successful in 12m34s
ci / build (pull_request) Successful in 18m7s
ci / image (pull_request) Successful in 5m22s

Switching a check type off in the admin area removed it for every
organization, own checkers included, and hid it from the organization's
own choice. The platform switch now only keeps such monitors off the
platform's regions: organizations with regions of their own still create
them there (422 check_type_own_checkers_only on a platform region), and
the editor marks them "own checkers only". Passive types, which no
checker runs, stay switched off entirely.

The organization's check types are chosen independently of the
platform's: its settings list every type, and the platform switch no
longer rewrites that choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-24 21:46:07 +01:00
1 parent 12e6de77aa
commit bd887523de
12 files changed
+2296 -2096

No files matched your search

+7 -2
View File
@@ -383,9 +383,14 @@ func (s *Server) orgSettingsView(c *gin.Context, p *principal, page web.Page, me
v.Usage = web.UsageView{Limits: webLimits(u.Limits), Monitors: u.Usage.Monitors, StatusPages: u.Usage.StatusPages}
off := s.disabledChecks(c.Request.Context())
for _, t := range check.Types {
if !off[string(t)] {
v.CheckTypes = append(v.CheckTypes, web.CheckTypeOption{Type: string(t), Enabled: !slices.Contains(p.Org.DisabledCheckTypes, string(t))})
o := web.CheckTypeOption{Type: string(t), Enabled: !slices.Contains(p.Org.DisabledCheckTypes, string(t))}
if off[string(t)] {
if check.Passive(t) {
continue
}
o.Note = "org.check_type_own_only"
}
v.CheckTypes = append(v.CheckTypes, o)
}
if p.Org.ApiTokenMaxDays != nil {
v.TokenMaxDays = int(*p.Org.ApiTokenMaxDays)