Commit Graph
2 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 c99aa6908d feat(entitlements): Staff preview grants for products not for sale yet
ci / test (pull_request) Successful in 25m20s
ci / image (pull_request) Skipped
ci / shared (pull_request) Successful in 12s
Lets BreakPilot staff open a product that is still disabled in the
catalogue (Werkmeister) for one tenant for a limited time, e.g. a seeded
staging tenant for portal#86, without a stage/prod divergence:

- Migration 0018: tenant_products.preview and preview_expires_at, kept
  apart from a booking's expires_at.
- Entitlement check: a disabled product is allowed only under an active
  preview (answer carries "preview": true); expiry is enforced at check
  time (reason preview_expired). A leftover plain row of a product off
  sale stays unknown_product.
- A real booking (ERP, trial, catalogue upsert) clears the preview and
  its expiry, so it never cuts off a paid entitlement; a preview over a
  booking is refused (409).
- Usage under a preview is accepted, tagged properties.preview=true and
  kept out of the ERP outbox; claims list a preview product only while
  it is active.
- Staff only, audited: POST /v1/admin/tenants/{id}/preview-grants
  {product, expires_at ≤ 180 d}, DELETE …/preview-grants/{product}; a
  named staff member (X-Staff-Subject) is required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 01:25:04 +02:00
sharang 209524e5ac feat(erp): always-on ERP link, usage events, outbox, CLI licences (#25)
ci / shared (push) Successful in 14s
ci / image (push) Successful in 28s
ci / test (push) Successful in 22m28s
2026-09-12 08:35:13 +00:00