feat(groups): add fail-closed admission management
CI / validate (push) Successful in 5m13s
Release / release (push) Successful in 7m8s

This commit is contained in:
dmg
2026-08-01 18:36:45 -04:00
parent 19a5d04178
commit b88097c15a
32 changed files with 1910 additions and 29 deletions
+12 -3
View File
@@ -5,9 +5,9 @@ import { db } from "@/lib/database";
const UI_ACCESSED = "games.minecraft.account-manager.ui.accessed";
export async function recordAdminEvent(
export async function recordAdminSubjectEvent(
admin: { email: string | null; name: string | null },
targetUserId: string,
subject: string,
type: string,
data: Record<string, unknown>,
) {
@@ -16,12 +16,21 @@ export async function recordAdminEvent(
return recordEvent(db, {
type,
source: "/web/admin",
subject: `user/${targetUserId}`,
subject,
ipAddress: ipAddress ?? undefined,
data: { ...data, adminEmail: admin.email, adminName: admin.name },
});
}
export async function recordAdminEvent(
admin: { email: string | null; name: string | null },
targetUserId: string,
type: string,
data: Record<string, unknown>,
) {
return recordAdminSubjectEvent(admin, `user/${targetUserId}`, type, data);
}
export async function recordUserEvent(
user: { id: string },
type: string,