Default new users to 'user' role instead of 'admin'

The bootstrap admin from ADMIN_USERNAME/ADMIN_PASSWORD is unaffected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
fuomag9
2026-04-05 22:33:30 +02:00
parent 03c8f40417
commit 708b908679

View File

@@ -71,7 +71,7 @@ export async function createUser(data: {
passwordHash?: string | null;
}): Promise<User> {
const now = nowIso();
const role = data.role ?? "admin"; // All users are admin by default
const role = data.role ?? "user";
const email = data.email.trim().toLowerCase();
const [user] = await db