mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 16:22:39 +10:00
feat: user page & $dropFetch util
This commit is contained in:
14
server/api/v1/admin/auth/index.get.ts
Normal file
14
server/api/v1/admin/auth/index.get.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { 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;
|
||||
});
|
||||
Reference in New Issue
Block a user