Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Paid, hosted product at menivor.com, now retired as a company project. Fresh squashed history of the cleaned working tree (secret-scanned, no .env, no customer data, no outreach logs). Built on MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
75 lines
2.6 KiB
TypeScript
75 lines
2.6 KiB
TypeScript
"use client";
|
|
|
|
import * as React from "react";
|
|
import { Loader2 } from "lucide-react";
|
|
import { ErasureRequestsTable } from "@/components/admin/compliance/ErasureRequestsTable";
|
|
import { RetentionOverviewTable } from "@/components/admin/compliance/RetentionOverviewTable";
|
|
import { OperatorErasureCard } from "@/components/admin/compliance/OperatorErasureCard";
|
|
import { useAdminCompliance } from "@/lib/use-admin-compliance";
|
|
|
|
/**
|
|
* Platform-admin compliance console (/admin/compliance, `is_staff` only — the
|
|
* surrounding {@link AdminShell} gates access and every underlying endpoint
|
|
* re-enforces `is_staff` server-side). A cross-tenant view of right-to-erasure
|
|
* requests and workspace retention posture, plus an operator-initiated erasure
|
|
* action. This surface is SEPARATE from per-workspace RBAC — a workspace owner
|
|
* is not a platform admin.
|
|
*/
|
|
export default function AdminCompliancePage() {
|
|
const { status, requests, policies, errorMessage, eraseUser } =
|
|
useAdminCompliance();
|
|
|
|
return (
|
|
<div className="space-y-8">
|
|
<div>
|
|
<h1 className="text-2xl font-bold tracking-tight">Compliance</h1>
|
|
<p className="mt-1 text-sm text-muted-foreground">
|
|
Right-to-erasure requests and data-retention posture across all
|
|
tenants.
|
|
</p>
|
|
</div>
|
|
|
|
{status === "loading" && (
|
|
<div className="flex items-center justify-center gap-2 py-16 text-muted-foreground">
|
|
<Loader2 className="size-5 animate-spin" aria-hidden />
|
|
Loading compliance overview…
|
|
</div>
|
|
)}
|
|
|
|
{status === "error" && (
|
|
<div
|
|
role="alert"
|
|
className="rounded-lg border border-destructive/40 bg-destructive/5 p-4 text-sm text-destructive"
|
|
>
|
|
{errorMessage}
|
|
</div>
|
|
)}
|
|
|
|
{status === "ready" && (
|
|
<>
|
|
<section className="space-y-3">
|
|
<h2 className="text-lg font-semibold tracking-tight">
|
|
Erasure requests
|
|
</h2>
|
|
<ErasureRequestsTable requests={requests} />
|
|
</section>
|
|
|
|
<section className="space-y-3">
|
|
<h2 className="text-lg font-semibold tracking-tight">
|
|
Retention overview
|
|
</h2>
|
|
<RetentionOverviewTable policies={policies} />
|
|
</section>
|
|
|
|
<section className="space-y-3">
|
|
<h2 className="text-lg font-semibold tracking-tight text-destructive">
|
|
Operator actions
|
|
</h2>
|
|
<OperatorErasureCard onErase={eraseUser} />
|
|
</section>
|
|
</>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|