Skip to content

Expose Box Office entitlements to availability gates - #132

Merged
einari merged 2 commits into
mainfrom
feature/availability-entitlements-value
Nov 13, 2026
Merged

einari merged 2 commits into
mainfrom
feature/availability-entitlements-value

Conversation

@einari

@einari einari commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Lets an availability gate read what Box Office entitles the tenant to, without merging modules and audiences.

Added

  • Cratis.Showrunner.BoxOffice.Product.Availability: AddBoxOfficeEntitlementsAvailability() supplies the host-provided context value entitlements (provide entitlements Entitlements from host), readable in available when conditions as the tenant's active state, readOnlyReason, seats and each module's level (None, Preview, Trial, Full) and usable (Expose Box Office entitlements as a host-provided context value #127)
  • Documentation on using entitlements in availability conditions and how Box Office modules relate to GuestList audiences

@einari einari added the minor New functionality - bumps the minor version label Nov 13, 2026
@einari einari self-assigned this Nov 13, 2026
@einari

einari commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Reviewer notes

  • Placement: the provider is a new package, BoxOffice.Product.Availability, mirroring GuestList.Availability, so BoxOffice.Product (and every product using it) takes no Choreography/Orleans dependency. No existing Box Office code changed.
  • Tenant scope: the engine's catalog and IHostContextValues are singletons while IEntitlements is scoped, so the value reads IEntitlements from IHttpContextAccessor.HttpContext.RequestServices. Outside a request it throws (failure, not denial).
  • Levels are text ("Full") because the engine's equality does not compare an enum against text.
  • Unknown module id is absent, so the gate is Unknown and denies.
  • Local: Debug build/specs (net10.0 and net11.0, 26 passed) and Release build, zero warnings. The PR body checker hook script could not be run from my shell (blocked by a guard); the body follows the allowed shape.

@einari
einari merged commit cef9a39 into main Nov 13, 2026
9 of 10 checks passed
@cratis-direct
cratis-direct Bot deleted the feature/availability-entitlements-value branch November 13, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New functionality - bumps the minor version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant