Skip to content

feat(foxy-user-invitation-form): grant customer anonymization as a write-only scope - #294

Open
brettflorio wants to merge 2 commits into
mainfrom
feat/customer-anonymizations-scope
Open

brettflorio wants to merge 2 commits into
mainfrom
feat/customer-anonymizations-scope

Conversation

@brettflorio

@brettflorio brettflorio commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

The API has a new store scope, customer_anonymizations_write. It is write-only: there is no _read token, and the API rejects one. It allows irreversible customer anonymization, and it is needed to turn a store's auto-anonymize on or change its window.

User invitations

  • Matrix: a new Customer anonymization row that offers only None and Full. Full writes customer_anonymizations_write alone.
  • Who can grant it: only a granter holding the token or store_full_access. If an invitation already has the scope and the editor lacks it, the scope control locks, as it does for any other grant they can't give.
  • Read preset: leaves it out.
  • Card: lists it under full access.
  • Implementation: a new WRITE_ONLY list, a subset of COLLECTIONS in the same way RESENDABLE is, matching the API's write-only collections.

StoreForm

  • The data-retention section is read-only when the user's scope restricts collections and lacks customer_anonymizations_write, matching the API, which refuses any data_retention change without that scope. Unrestricted scopes are unchanged.

Tests

wtr groups in the Playwright image:

  • utils 102
  • foxy-user-invitation-form 132
  • foxy-user-invitation-card 28
  • foxy-store-form 150
  • mixins 20

All pass, as do eslint, prettier and tsc --noEmit.

Linear: FX-40

🤖 Generated with Claude Code

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Brett Florio seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pheekus
pheekus self-requested a review November 12, 2026 17:56

@pheekus pheekus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested via a private channel.

Brett Florio and others added 2 commits November 12, 2026 12:30
…ite-only scope

The API added `customer_anonymizations_write`, a store scope with no read
counterpart that allows irreversible customer anonymization and is needed
to turn on or change automatic anonymization.

User invitations:
- New WRITE_ONLY list (a subset of COLLECTIONS, like RESENDABLE) with
  `customer_anonymizations`.
- The custom matrix offers only None and Full for a write-only row, and
  Full writes the write token alone. The read preset leaves it out.
- Only a granter holding the write token or store_full_access can grant it.
- The card lists it under full access, never under read-only.

Store form:
- The data retention section is read-only when the current user's scope
  restricts collections and lacks `customer_anonymizations_write`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ad preset

parseScope, canGrantReadPreset and the scope control each spelled out the
read preset's level for a write-only collection; they now share it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brettflorio
brettflorio force-pushed the feat/customer-anonymizations-scope branch from 5550acd to f041521 Compare November 12, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants