feat: add global auth settings and pending users
This commit is contained in:
@@ -2,6 +2,7 @@ import { and, eq, inArray, isNull, or } from "drizzle-orm";
|
||||
|
||||
import { getDatabase } from "@/modules/core/server/db";
|
||||
import { permissions, rolePermissions, roles } from "@/modules/core/server/schema";
|
||||
import { ensureSystemSettings } from "@/modules/core/server/system-settings";
|
||||
import type { Permission, RoleDefinition, RoleId } from "@/modules/core/types";
|
||||
import { PERMISSIONS, ROLE_LABELS } from "@/modules/core/types";
|
||||
|
||||
@@ -132,6 +133,7 @@ export const SYSTEM_ROLE_DEFINITIONS: SeedRole[] = [
|
||||
|
||||
export async function ensureSystemDefaults(): Promise<void> {
|
||||
const database = getDatabase();
|
||||
await ensureSystemSettings();
|
||||
|
||||
await database
|
||||
.insert(permissions)
|
||||
|
||||
Reference in New Issue
Block a user