| 1 | -- What a user may do besides move their own money: review transfers, so far. |
| 2 | -- The check catches a typo, like reveiwer, before it locks someone out. |
| 3 | ALTER TABLE users ADD COLUMN roles text[] NOT NULL DEFAULT '{}' |
| 4 | CHECK (roles <@ ARRAY['reviewer']); |
| 5 | |
| 6 | -- auth_app reads roles, and puts them in tokens. It can't grant one: it has |
| 7 | -- no UPDATE on users at all. Only an admin can, by hand. |
| 8 | REVOKE UPDATE ON users FROM auth_app; |