mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-09 20:12:10 +10:00
15 lines
509 B
TypeScript
15 lines
509 B
TypeScript
import type { AuthMec } from "@prisma/client";
|
|
import aclManager from "~/server/internal/acls";
|
|
import { applicationSettings } from "~/server/internal/config/application-configuration";
|
|
|
|
export default defineEventHandler(async (h3) => {
|
|
const allowed = await aclManager.allowSystemACL(h3, ["auth:read"]);
|
|
if (!allowed) throw createError({ statusCode: 403 });
|
|
|
|
const enabledMechanisms: AuthMec[] = await applicationSettings.get(
|
|
"enabledAuthencationMechanisms",
|
|
);
|
|
|
|
return enabledMechanisms;
|
|
});
|