Files
uptimesebi/internal/store/queries/orgs.sql
T
Sebastian UnterschützandClaude Opus 5.5 465fda60dc
ci / image (pull_request) Successful in 3m33s
ci / lint (pull_request) Successful in 6m25s
ci / test (pull_request) Successful in 11m34s
ci / build (pull_request) Successful in 11m54s
feat: choose which checkers may check private addresses, check types per organization
Whether platform checkers may check private addresses, including the
host's Docker socket, is now a platform setting; unset, it stays as
before: allowed self-hosted, forbidden in the cloud edition. Each of an
organization's checkers has its own switch, on by default, settable at
creation and toggled in the checker list. Both apply from the checker's
next poll.

Organizations choose in their settings which of the platform's check
types their members are offered; existing monitors keep running, and if
the platform later switches off everything an organization kept, it is
offered the platform's types again rather than none. Forms marked
data-autosave are sent when a field changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 17:18:22 +01:00

24 lines
605 B
SQL

-- name: CreateOrg :one
INSERT INTO orgs (id, slug, name) VALUES ($1, $2, $3)
RETURNING *;
-- name: GetOrg :one
SELECT * FROM orgs WHERE id = $1;
-- name: GetOrgBySlug :one
SELECT * FROM orgs WHERE slug = $1;
-- name: ListOrgs :many
SELECT * FROM orgs ORDER BY name;
-- name: DeleteOrg :execrows
DELETE FROM orgs WHERE id = $1;
-- name: UpdateOrgPolicy :one
UPDATE orgs SET require_totp = $2, require_sso = $3, api_token_max_days = $4, updated_at = now()
WHERE id = $1
RETURNING *;
-- name: SetOrgDisabledCheckTypes :exec
UPDATE orgs SET disabled_check_types = $2, updated_at = now() WHERE id = $1;