Phase 13, part 7: the platform's own admin
The people running the multi-tenant service (SUPERMARKET_PLATFORM_ADMINS, with two-factor sign-in) see every team at /platform with its size, people and what failed lately, and can suspend or restore a team, resend its invitations and release its domain. They don't see a team's data unless they view as it: with a reason, for at most an hour, read-only, recorded in the team's own audit log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -282,6 +282,15 @@ ALTER TABLE teams ADD COLUMN verify_token TEXT NOT NULL DEFAULT ''; -- what the
|
||||
ALTER TABLE teams ADD COLUMN verified_at TEXT NOT NULL DEFAULT ''; -- '' until proved
|
||||
ALTER TABLE teams ADD COLUMN verified_by TEXT NOT NULL DEFAULT ''; -- dns, file or search-console
|
||||
CREATE UNIQUE INDEX teams_proved_domain ON teams(domain) WHERE verified_at <> '';
|
||||
`,
|
||||
},
|
||||
// 42
|
||||
{
|
||||
Note: "the platform's admins looking at a team, with a reason, for a while",
|
||||
Platform: true,
|
||||
SQLite: `
|
||||
ALTER TABLE sessions ADD COLUMN view_until TEXT NOT NULL DEFAULT ''; -- a platform admin viewing a team: until then
|
||||
ALTER TABLE sessions ADD COLUMN view_reason TEXT NOT NULL DEFAULT '';
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user