Repository navigation
Releases
v1.8.2
Behoben
- Ein werfender
UsageConsumed- oderLimitReached-Listener kostet dem Aufrufer nicht mehr den Beleg; eine gebuchte Nutzung lässt sich immer zurückgeben. - Geplanter Lauf,
claimPending()undrevoke()geben den Claim zurück, wenn ein Listener wirft, und melden den Fehler mit Trigger und IDs. Der nächste Lauf versucht es erneut. renew()lässt Lifetime-Zugänge unbegrenzt und rührt wartende Zugänge nicht an;enterGracePeriod()lehnt eine Pending-Zeile ab.
Update
Keine Migration, kein neuer Config-Schlüssel.
v1.8.1
[1.8.1] — 2026-11-16
Fixed
- Granting on a user page after a revocation no longer does nothing silently. The row of a revoked grant offers "Restore access" in its menu (with the grant permission), and a manual grant that lands on a revoked grant answers 409 with
saved: false,revoked: trueand arestore_url, so neither the user section nor the "create grant" form reads it as a success (the section shows a hint). A failed restore has its own message.grant()itself still leaves a revoked grant revoked, so a retried webhook cannot undo a refund. - Control Panel: the entitlement detail pages (show, revoke, restore) show the setup screen when the addon's tables are missing, instead of a query error (HTTP 500).
Upgrading
- Requires statamic-brand-context 1.27 or newer. No migration, no new config key.
v1.8.0
1.7.0
Changed
- Settings: the addon now declares
settingsNavParent()([section, name]of its own Control Panel navigation entry). With statamic-brand-context 1.16 or newer its settings show as the sub-item "Einstellungen" under that entry; addons without a navigation of their own share one "Addon-Suite" page under Settings. Older brand-context versions ignore the method and keep the previous layout.
Upgrading
- No migration, no new config key.
1.6.0
Picking instead of typing. Granting no longer asks for slugs and IDs from memory.
Added
- [new] Product catalogue.
Entitlements::registerProducts()(a closure, an array, an object with
grantableProducts(), or the container tagentitlements.product-catalog) lets another addon
announce grantable products asslug => labelorslug => ['label' => …, 'group' => …]. Read
when a form asks, never at boot; a failing source is logged and skipped. Names only, never a
whitelist: an unregistered slug still writes, resolves and grants.Entitlements::grantableProducts()
reads it. statamic-products registers its accesses from its next release. - [new] Grant form picks the person. "Granted to" is a person by default, chosen through core's
userssearch by name or email; the reference is derived by the boundSubjectResolver, as
Entitlements::grant($user, …)does. Type and ID stay available for every other subject. - [new] Product pickers. With a catalogue, the product in the grant form, in "new limits" and in
the user section is a searchable select offering catalogue entries only, by name. Slugs already
granted that no source knows are not offered; they stay visible, flagged, on the grant and in the
user section. The server still accepts any slug, so integrations posting one keep working.
Without any catalogue every product field stays free text. - [new] People by name. Where the subject is a Statamic user, the listing, the grant and the
revocation form show her name (with email, linked to her user page); the key stays as a side
note. Other subject types keep theSubjectResolverlabel. The listing search also matches a
person's name and email and a product's catalogue name.?subject=type:idfilters the listing to
one subject; the user section's "all grants" link uses it. - [new] "Zugänge" section for user pages. The fieldtype
user_entitlementslists a user's grants
(name, state, source, from, until, link to the grant), grants an access from a stack (picker,
optional start and end) and revokes with a mandatory reason. It posts to the manual grant and
the revocation, so it writes exactly what Users > Entitlements writes (sourcemanual, actor)
and is gated by the same permissions. It stores nothing on the user. New read route
entitlements.user(view entitlements). - [new] Grant detail, listing and limits show the product name next to the slug; the grant detail and
the user section flag a slug no catalogue source knows.
Changed
- German Control Panel: the screens are called "Vergaben" (were "Berechtigungen", which clashed with
core's roles screen under the same section); permission labels follow. One set of terms
throughout: a grant is a "Vergabe", what is granted a "Zugang", granting is "Zugang
freischalten", revoking "Zugang entziehen". English is unchanged. - The revocation is its own page (
entitlements::Entitlements/Revoke) instead of core's
PublishForm, whose button can only say "Save"; its button reads "Revoke access". Same route,
same validation, same permission. - Revoked grants in the user section show when they were revoked instead of an empty "until".
- The grant detail page and the user section show dates in the viewer's locale and timezone, as
core does; the UTC stamp is the tooltip on the detail page. - The manual grant accepts
subject_kind(user,other) andsubject_user. A request without
subject_kindthat sendssubject_typeis treated asother, so existing integrations keep
working unchanged.
1.5.0
Notes
consume()andrelease()are new in this release; no released API changes.consume()
returns?UsageReceipt: check with! consume(...)or=== null. Code written against the
development branch, where it briefly returnedbool, must drop=== false/=== true.
Added
- [new] Limits. Products carry limits (
key => number|null), set in the Control Panel
(Entitlements → Limits), withEntitlements::setLimits()or inentitlements.limits.products.
Two kinds: usage permonth/year, counted here (consume(),release(),resetUsage()), and
stock the app counts (withinLimit()).limit(),remaining(),quota(),quotasFor()read them.
Highest value over every grant that gives access; usage counts at the subject holding the grant.
Bookings are atomic (conditional UPDATE,insertOrIgnoreagainst a unique index), raced for real
on MySQL and Postgres in CI. New tablesentitlement_limitsandentitlement_usages. - [new] Further subjects.
Entitlements::extendSubjects()andContracts\SubjectExpander(or the tag
entitlements.subject-expanders): a team's grants count for its members indecide(),allows(),
activeProductSlugsFor()and every limit. Never inforSubject()or writes. - [new] Events
LimitReached,UsageConsumed,UsageReset;entitlements:announcealso announces
periods that ended. - [new] Webhook Manager: all eight events are triggers (
entitlements.*). Automations: the three limit
events are triggers. - [new] "Limit reached" mail as an email-templates template (
entitlements-limit-reached), off by default,
switched on per brand in the settings.Entitlements::mailRecipientsUsing(). - [new] Settings:
limits.fallback_product,limits.period_anchor,mail.limit_reached.enabled,
mail.limit_reached.template. - [new] Control Panel: limits per product, the subject's limits on a grant with a reset, and a wiring page.
New permissionmanage entitlements limits. - [new] A Statamic user (file or Eloquent repository) is accepted as a subject.
- [new]
consume()returns aUsageReceipt(null when refused);release(..., receipt:)gives a booking
back into its own period and holder, up to what was booked. The server keeps every receipt
(tableentitlement_usage_receipts) and checks a release against that copy only: the id is the
one thing read from what the caller presents; the brand must be the current one, the key the one
asked about, the holder the subject or one it acts for.resetUsage()closes the open receipts
of the counter it resets, in the same transaction. Claim and deduction in one transaction,
never below zero. Without a receipt a release stays in the current period and logs when it finds
nothing. - [new] Fallback product per subject type (
limits.fallback_products) andEntitlements::fallbackUsing(). - [new]
-1inlimits.productsreads as unlimited; stored limits refuse it. - [new] Period anchor per key (
limits.keys.<key>.anchor). - [new] Several teams at equal height resolve to the smallest subject key;
withinLimit()records a
count only for the holder itself.
Fixed
- [fix]
manual.subject_typessteht nicht mehr auf der Einstellungsseite der Suite. Der Wert darf
eine flache Liste oder eine ZuordnungTyp => Beschriftungsein (Blueprintsliest
beide); die Einstellungs-Schicht kennt keinen Typ fuer eine Zuordnung, und alslist
deklariert reichte er auf einer Site mit Zuordnung ein Objekt an die Oberflaeche — das
join()dort starb und nahm die Einstellungsseite aller Addons mit. Zuordnungen bleiben
inconfig/, so entschieden am 07.09.2026. Wer den Wert bisher ueber das Control Panel
gespeichert hatte, traegt ihn inconfig/entitlements.phpnach: eine Zeile aus einer
aelteren Version wird nicht mehr angewandt.
1.4.0
Fixed
- [fix]
/cp/entitlementsanswered HTTP 500 on an install whose migrations had never run. It now
shows an empty state naming the missing table and what to run, and writes the reason to the
log. The JSON branch the listing fetches is covered by the same check. - [fix] A test pinned the grace period to a fixed calendar date and compared it against
now(), so it
turned red on 08.09.2026 without anything changing. It works in relative dates now, like the
rest of the suite.
1.3.0
New: three values in the Control Panel
Under Settings → Addon Settings there is a section for this addon, with two groups:
- [new] Control Panel: the rows per listing page, and the permitted subject types. If anything is
entered for the types, the manual grant form offers only those; empty means free text, and a
typo then creates a grant that belongs to nobody and only surfaces once somebody complains. - [new] Neighbouring addons: whether the four figures are reported to Insights. Off means they do
not appear there at all — which is something other than a zero.
Only the deviation is stored, everything else still follows config/entitlements.php.
Not on the page, and the group texts say so: cp.enabled is read while the routes are
registered and while the navigation is built. bridges.activity is worse than merely late,
because the bridge remembers in a static property that it has attached; a later "off" does not
detach the listeners again. sources is a mapping from handle to display name and is not a
whitelist either: a source that is not listed writes and grants just the same, it only shows its
raw handle. And manual.source is the value in the source column of every row written by
hand — changing it separates the new rows from the existing ones without changing anything about
those.
New permission manage entitlements settings. Nobody holds it at first, and until it is
assigned to a role the section stays invisible. The three existing permissions are unchanged.
Requires goldnead/statamic-brand-context 1.13 or later. Older versions show the page but
do not apply its values reliably: on an installation with a single brand the settings of the
addons registered last did not reach the config at all, and up to 1.12 a second save of the same
section deleted the first save's override without a message. If you set values before the
update, check afterwards whether they are still there.
1.2.1
Fixed: revocation moved into the header menu, and an icon that did not exist
book-open-cover is not a name in the set, so it rendered an empty box (it is
content-book-open). Revocation stays a link to the form — the reason is mandatory and has no
room in a dialog — but it now sits in the … menu instead of being a red button in the header.
Core uses danger in exactly one place, the confirm button inside a modal.
Fixed: the last second of a period is inside the "active" figure
The three event figures compare their window half-open — < midnight rather than
<= 23:59:59.999999 — because a query binding formats a date as Y-m-d H:i:s and drops the
fraction. Active could not inherit that: a stock is asked of an instant, so it writes its own
comparisons, and they were the inclusive kind.
Two consequences, both silent and both only on engines that keep the fraction. A grant that began at
23:59:59.500 on the closing day was counted by "granted" and missing from "active", on the same
screen for the same period. And a grant whose expires_at or revoked_at fell in that same
fraction was counted as gone by "expired"/"revoked" and still live by "active".
The running balance had the third half of it: whereBetween is inclusive at the far end, so an
arrival or a departure in the final second landed in no bucket at all and the chart disagreed with
its own headline.
1.2.0
Added: this addon's figures appear in Insights
From 1.1.0 statamic-insights is no longer a revenue report but the family's reporting layer: an
addon registers what it can count and gets the period, the comparison against the period before,
the chart, the breakdowns and two finished screens in return.
The coupling is optional in both directions. Without Insights nothing here is missing; without
this addon only its own group is missing over there. suggest, never require.
Every figure follows the contract's house rules: null is not zero (a rate with no denominator
has no answer and does not print 0 %), available() decides existence and never the data, gaps in
a series are filled by Insights rather than by the metric, and a filter a metric does not
understand is ignored rather than fatal.
Four figures: granted, revoked, expired, active. The active one is a stock and is therefore asked of
an instant rather than of a window.
Two things found here went back upstream. This package writes its timestamps in UTC unconditionally,
which had the clamp on "now" reading the wrong clock — one zone() now, instead of a restated
untilNow(). And the test that used to hold that the figures do not stop at a brand boundary is
reversed: a tile counting four brands beside one counting a single brand is a data leak between
customers, not a feature.
Fixed: a figure counts the current brand only
While the family was being wired up this question got four different answers, and side by side on
one screen that is worse than none: one tile showed three other brands' turnover while its
neighbour filtered correctly. The rule now lives once, in TableMetric::brandScoped(), transcribed
from BrandScope::apply(); this package only names the column, and the figure, the chart and every
breakdown narrow together.
With no brand selected the tile reads 0 and stays. A reader can make sense of a zero; a tile
that is not there he cannot notice.