Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+19
-5
@@ -25,8 +25,9 @@ import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
|
||||
import { Form, redirect, useActionData, useLoaderData } from "react-router";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { createAuditEvent } from "@toolctrl/db/audit-events.server";
|
||||
import { getDbClient } from "@toolctrl/db/client.server";
|
||||
import { createAuditEvent } from "@hivegrid/db/audit-events.server";
|
||||
import { getDbClient } from "@hivegrid/db/client.server";
|
||||
import { createGdprExportJob } from "@hivegrid/db/privacy-gdpr.server";
|
||||
|
||||
import { getTranslations } from "~/locale/i18next.server";
|
||||
import { useLocaleFormatters } from "~/locale/format";
|
||||
@@ -35,6 +36,7 @@ import { getTenantIdFromUrl } from "~/utils/services/.server/urlService";
|
||||
import { requireAuth } from "~/utils/loaders.middleware";
|
||||
import { DeletionTokenSecretMissingError, signDeletionToken } from "~/utils/dsgvo/deletionToken.server";
|
||||
import { sendEmailMailjet } from "~/modules/emails/services/MailjetEmailService";
|
||||
import { enqueueGdprExport } from "~/utils/privacy/gdprExportQueue.server";
|
||||
|
||||
const DSGVO_GRACE_PERIOD_DAYS = Number(process.env.DSGVO_GRACE_PERIOD_DAYS ?? "30") || 30;
|
||||
|
||||
@@ -113,8 +115,20 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
|
||||
const requestId = randomUUID();
|
||||
|
||||
if (intent === "export") {
|
||||
// Record the request as an AuditEvent — the worker job picks it up
|
||||
// out-of-band (queue glue lives in apps/worker/src/index.ts).
|
||||
const exportJob = await createGdprExportJob({
|
||||
tenantId,
|
||||
requestedByUserId: userInfo.userId,
|
||||
targetUserId: userInfo.userId,
|
||||
scope: "user_self",
|
||||
});
|
||||
const enqueueResult = await enqueueGdprExport({
|
||||
exportJobId: exportJob.id,
|
||||
tenantId,
|
||||
requestedByUserId: userInfo.userId,
|
||||
targetUserId: userInfo.userId,
|
||||
scope: "user_self",
|
||||
requestId,
|
||||
});
|
||||
await createAuditEvent({
|
||||
tenantId,
|
||||
actorId: userInfo.userId,
|
||||
@@ -125,7 +139,7 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
|
||||
regulatoryScope: ["gdpr"],
|
||||
dataSensitivity: "pii",
|
||||
outcome: "success",
|
||||
metadata: { requestId, intent: "export", source: "self-service" },
|
||||
metadata: { requestId, intent: "export", source: "self-service", gdprExportJobId: exportJob.id, enqueueResult },
|
||||
});
|
||||
const data: ActionData = {
|
||||
intent: "export",
|
||||
|
||||
Reference in new issue
Block a user