mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-20 11:41:14 +10:00
13 lines
402 B
TypeScript
13 lines
402 B
TypeScript
import aclManager from "~/server/internal/acls";
|
|
import { userACLDescriptions } from "~/server/internal/acls/descriptions";
|
|
|
|
/**
|
|
* Fetch ACL descriptions.
|
|
*/
|
|
export default defineEventHandler(async (h3) => {
|
|
const userId = await aclManager.getUserIdACL(h3, []); // No ACLs only allows session authentication
|
|
if (!userId) throw createError({ statusCode: 403 });
|
|
|
|
return userACLDescriptions;
|
|
});
|