mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 16:51:15 +10:00
feat(acls): refactor & acl descriptions
This commit is contained in:
9
server/api/v1/admin/user/token/token.get.ts
Normal file
9
server/api/v1/admin/user/token/token.get.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import aclManager from "~/server/internal/acls";
|
||||
import { userACLDescriptions } from "~/server/internal/acls/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;
|
||||
});
|
||||
Reference in New Issue
Block a user