From 21f61ca33f2f4ad8a0eeba69110c1b3e926002e7 Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Thu, 27 Aug 2026 18:36:04 -0400 Subject: [PATCH] feat(evaluations): add permissions and event logging Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/collections/game/GameEventLogs.ts | 1 + src/permissions/index.ts | 13 +++++++++++++ src/utils/event-log/emit.ts | 1 + src/utils/event-log/eventTypes.ts | 3 +++ 4 files changed, 18 insertions(+) diff --git a/src/collections/game/GameEventLogs.ts b/src/collections/game/GameEventLogs.ts index 19c7e39..d100cf2 100644 --- a/src/collections/game/GameEventLogs.ts +++ b/src/collections/game/GameEventLogs.ts @@ -23,6 +23,7 @@ const TARGET_COLLECTIONS = [ { label: "Loadouts", value: "loadouts" }, { label: "Market Listings", value: "market-listings" }, { label: "Market Negotiations", value: "market-negotiations" }, + { label: "Evaluations", value: "evaluations" }, { label: "Tickets", value: "tickets" }, { label: "Game Servers", value: "game-servers" }, ] as const; diff --git a/src/permissions/index.ts b/src/permissions/index.ts index 0124a98..eab6924 100644 --- a/src/permissions/index.ts +++ b/src/permissions/index.ts @@ -112,6 +112,15 @@ export const PERMISSION_GROUPS: PermissionGroup[] = [ { value: "user-notifications:delete", label: "Delete" }, ], }, + { + group: "Evaluations", + permissions: [ + { value: "evaluations:create", label: "Create" }, + { value: "evaluations:read", label: "Read" }, + { value: "evaluations:update", label: "Update" }, + { value: "evaluations:delete", label: "Delete" }, + ], + }, // ---- Intelligence -------------------------------------------------------- { @@ -503,6 +512,10 @@ export const ALL_PERMISSION_VALUES = PERMISSION_GROUPS.flatMap((g) => "user-notifications:read", "user-notifications:update", "user-notifications:delete", + "evaluations:create", + "evaluations:read", + "evaluations:update", + "evaluations:delete", "missions:create", "missions:read", "missions:update", diff --git a/src/utils/event-log/emit.ts b/src/utils/event-log/emit.ts index ac5d743..02a0afb 100644 --- a/src/utils/event-log/emit.ts +++ b/src/utils/event-log/emit.ts @@ -28,6 +28,7 @@ interface GameEventInput { | "loadouts" | "market-listings" | "market-negotiations" + | "evaluations" | "tickets" | "game-servers"; targetId?: number; diff --git a/src/utils/event-log/eventTypes.ts b/src/utils/event-log/eventTypes.ts index ea7b3d8..8577794 100644 --- a/src/utils/event-log/eventTypes.ts +++ b/src/utils/event-log/eventTypes.ts @@ -89,6 +89,9 @@ export const EventTypes = { // Attendance MissionAttendanceChange: "mission:attendance-change", + // Evaluations + EvaluationSubmit: "evaluation:submit", + // Missions MissionAutoComplete: "mission:auto-complete", MissionObjectiveRedactedToggle: "mission:objective-redacted-toggle",