Prerequisites
Supabase Studio
Access to the Supabase dashboard for your ThreatLab instance, with permission to open the SQL Editor.
PostgreSQL access
Alternatively, a direct
psql connection to the underlying PostgreSQL database with a role that can write to auth.users and public.user_roles.Promoting the First Admin
Sign in to ThreatLab
Open your ThreatLab instance and sign in with the account you want to promote to admin. If the account does not exist yet, create it first through the normal sign-up flow.
Open the SQL editor
In Supabase Studio, navigate to the SQL Editor. If you are using a direct connection, open a
psql session against your database instead.Run the promotion query
Copy the SQL below, replace
you@your-org.com with the email address of the account you signed in with, and execute it.After Promotion
Once you sign back in, you will see the full admin navigation: Users, Roles, Resources, and Status. From here you can grant theadmin role to additional accounts through Admin > Users > Assign Role — no further SQL is required.
After bootstrapping the first admin, all subsequent role assignments are handled through the ThreatLab UI — no further SQL is required.