Phase 13, part 2: each team's own database role

A team's connections take a Postgres role that owns its schema and may
use the shared tables, nothing else: even SQL naming another team's
schema is refused. The second guard behind the search_path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 12:11:57 -07:00
co-authored by Claude Opus 5.5
parent 0e695ac810
commit 210b1e57fc
4 changed files with 136 additions and 10 deletions
+1
View File
@@ -199,6 +199,7 @@ func openTestSchema(base string) (*DB, error) {
rows.Close()
for _, n := range teams {
admin.Exec(`DROP SCHEMA ` + n + ` CASCADE`)
dropRole(admin, n) // a team's role is named as its schema
}
}
_, err = admin.Exec(`DROP SCHEMA ` + schema + ` CASCADE`)