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:
@@ -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`)
|
||||
|
||||
Reference in New Issue
Block a user