feat(auth): pnpm admin:grant <email> CLI to flip user role to admin
Tiny tsx script that flips user.role to "admin" via BetterAuth's admin plugin convention (role column on the existing user table, not a custom isAdmin boolean). Wired through packages/auth → root package.json with the same env-sourcing pattern as auth:seed. Usage: pnpm admin:grant me@example.com
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
"lint:ws": "pnpm dlx sherif@latest -r packages-without-package-json",
|
||||
"prepare": "husky",
|
||||
"auth:seed": "set -a && source apps/web/.env.local && set +a && pnpm --filter @turbostarter/auth db:seed",
|
||||
"admin:grant": "set -a && source apps/web/.env.local && set +a && pnpm --filter @turbostarter/auth admin:grant",
|
||||
"services:logs": "docker compose logs -f",
|
||||
"services:setup": "pnpm services:start && pnpm with-env turbo setup",
|
||||
"services:start": "docker compose up -d --wait",
|
||||
|
||||
Reference in New Issue
Block a user