Skip to content

Commit 5052c9a

Browse files
committed
docs(permission-groups): record the data-drain policy and make the cost hint honest
Data drains are an organization-admin instrument, deliberately above member permission groups like the audit-log surface — the reader of a drained record is the organization, not a member. Recorded on the drain access gate so the next auditor finds a decision, not a gap. The hideCostInfo hint no longer promises that ALL exports omit spend.
1 parent a071fdd commit 5052c9a

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎apps/sim/lib/data-drains/access.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ export type DrainAccessResult =
2424
/**
2525
* Auth + membership + role + enterprise-plan gate shared by every data-drain
2626
* route. Owner/admin role is required for reads as well as writes since drain
27-
* configs expose customer bucket names and webhook URLs. On Sim Cloud the
27+
* configs expose customer bucket names and webhook URLs.
28+
*
29+
* Deliberately above member permission groups, like the audit-log surface:
30+
* the reader of a drained record is the organization, not a member, so the
31+
* per-member log projections (`hideCostInfo`, `hideTraceSpans`) do not apply
32+
* to what a drain serializes, and no group capability gates configuring one —
33+
* the owner/admin requirement is the whole access story. On Sim Cloud the
2834
* gate is the Enterprise plan; on self-hosted it's `DATA_DRAINS_ENABLED`,
2935
* which 404s when unset so a newer image doesn't silently expose drains.
3036
*/

‎apps/sim/lib/permission-groups/fields.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ export const PERMISSION_GROUP_FIELDS = {
397397
id: 'hide-cost-info',
398398
label: 'Execution Cost',
399399
category: 'Logs',
400-
hint: 'Withhold execution cost. Logs and exports omit cost and token spend.',
400+
hint: 'Withhold execution cost. Logs and member exports omit cost and token spend; organization-level data drains, configurable by org admins only, are not projected.',
401401
}),
402402
disableKnowledgeBaseCreation: booleanRestriction('capability', {
403403
scope: 'workspace',

0 commit comments

Comments
 (0)