feat(store): let regions and agents belong to the platform or one organization

Regions are identified by id so organizations can reuse keys. Triggers
keep agents in regions of the same owner and monitors in platform or own
regions. Platform admins are a user flag.

Refs #52

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-22 01:36:02 +01:00
1 parent 7bb4afa04a
commit 607798d742
10 files changed
+442 -99

No files matched your search

@@ -0,0 +1,8 @@
-- +goose Up
-- Platform admins manage what all organizations share: platform regions,
-- checkers and status page servers. Granted with "api admin grant"; the
-- first user of a self-hosted installation becomes one at signup.
ALTER TABLE users ADD COLUMN is_admin boolean NOT NULL DEFAULT false;
-- +goose Down
ALTER TABLE users DROP COLUMN is_admin;