Files
SciMesh/users/migrations/0002_user_verified.up.sql
Efremenko Arhip c6a66747eb feat(users): add admin-granted verified badge for trusted contributors
- migration 0002: users.verified boolean, default false
- verified rides in the JWT (role + verified claims)
- POST /users/{id}/verify + /unverify, admin-only (403 otherwise)
- Issue now takes the whole user so trust claims travel in the token
- unit + integration + admin-flow tests
2026-07-26 19:10:01 +03:00

10 lines
399 B
PL/PgSQL

BEGIN;
-- A "verified" account is a trusted contributor: the coordinator accepts its
-- workers' results directly, without quorum cross-checking. Distinct from role
-- (which governs what a user may do with their own jobs). Granted by an admin,
-- never self-served; defaults to false, so a fresh account is untrusted.
ALTER TABLE users ADD COLUMN verified boolean NOT NULL DEFAULT false;
COMMIT;