mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-21 12:11:09 +10:00
partial: new documentation additions (company admin)
This commit is contained in:
@ -2,6 +2,9 @@ import { AuthMec } from "~/prisma/client/enums";
|
||||
import aclManager from "~/server/internal/acls";
|
||||
import authManager from "~/server/internal/auth";
|
||||
|
||||
/**
|
||||
* Fetches all the enabled authentication mechanisms on this instance, and their configuration, if enabled.
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, ["auth:read", "setup"]);
|
||||
if (!allowed) throw createError({ statusCode: 403 });
|
||||
|
||||
@ -8,7 +8,8 @@ const DeleteInvite = type({
|
||||
}).configure(throwingArktype);
|
||||
|
||||
/**
|
||||
* Delete a simple auth invitation
|
||||
* Deletes a "Simple" invitation
|
||||
* @returns nothing
|
||||
*/
|
||||
export default defineEventHandler<{
|
||||
body: typeof DeleteInvite.infer;
|
||||
|
||||
@ -3,6 +3,9 @@ import { systemConfig } from "~/server/internal/config/sys-conf";
|
||||
import prisma from "~/server/internal/db/database";
|
||||
import taskHandler from "~/server/internal/tasks";
|
||||
|
||||
/**
|
||||
* Fetches a "Simple" invitation
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, [
|
||||
"auth:simple:invitation:read",
|
||||
|
||||
@ -11,6 +11,9 @@ const CreateInvite = SharedRegisterValidator.partial()
|
||||
})
|
||||
.configure(throwingArktype);
|
||||
|
||||
/**
|
||||
* Creates a "Simple" invitation
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, [
|
||||
"auth:simple:invitation:new",
|
||||
|
||||
Reference in New Issue
Block a user