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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user