Browse documentation

Docs / Permissions and trust /

PermissionHistoryRow

Immutable row in a permission audit log: action, decision, actor, and timestamp.

Preview

Write to production databaseGranteddb:write

Approved for the migration run.

Avery Chendataops-v2Today at 14:32
Send email to 2,400 usersDeniedemail:send

Wrong segment selected — denied until corrected.

Avery Chencampaign-agentToday at 11:07
Read analytics dashboardAlways allowanalytics:read
Systemautoreporting-agentYesterday at 09:15
Push to main branchRevokedgit:push

Access revoked after failed deployment.

Avery Chenci-agent3 days ago

Variants

Granted — with revoke

Push to staging branchGrantedgit:push
Avery Chendeploy-agentToday at 16:45

Always allow — auto actor

Read S3 bucketAlways allows3:read

Matches the global S3 read allowlist.

Policy engineautodata-pipeline2 weeks ago

Props

PropTypeDescription
title*stringHuman-readable action label.
scope*stringThe scope string in mono — e.g. "db:write".
decision*"granted" | "denied" | "always" | "revoked"The permission outcome.
actor{ name: string; auto?: boolean }Who made the decision. When auto is true, renders an Auto badge.
agentstringThe agent identifier in mono.
timestamp*stringHuman-readable timestamp — e.g. "Today at 14:32".
rationalestringOptional explanation shown below the title row.
onRevoke() => voidWhen provided and decision is not denied/revoked, renders a Revoke button.
onReRequest() => voidWhen provided for a denied decision, renders a Request again button.
onView() => voidWhen provided, renders a View button.
classNamestringAdditional CSS classes for the row root.

* required.

Usage

import { PermissionHistoryRow } from "@/components/agent/permission-history-row";

<PermissionHistoryRow
  title="Write to production database"
  scope="db:write"
  decision="granted"
  actor={{ name: "Avery Chen" }}
  agent="dataops-v2"
  timestamp="Today at 14:32"
  onView={() => {}}
  onRevoke={() => {}}
/>