c5166ba3a9
Add admin layout with auth guard, user management (CRUD + group membership), group management, system settings (auth mode, registration, theme, healthcheck), permission editor component, and global search API endpoint.
9 lines
236 B
TypeScript
9 lines
236 B
TypeScript
import type { LayoutServerLoad } from './$types.js';
|
|
import { requireAdmin } from '$lib/server/middleware/authorize.js';
|
|
|
|
export const load: LayoutServerLoad = async (event) => {
|
|
const user = requireAdmin(event);
|
|
|
|
return { user };
|
|
};
|