five-on-it / apps/api/src/entitlement
apps/api/src/entitlement
Who may do what on the platform (TECHNICAL_SPECS §9.6), under its entitlement (FOI_ENTITLEMENT): the levels a route asks of its caller (need() in app.ts), and the Steam accounts' entitlements (store.ts) kept fresh.
| Level | open (the default: as before Steam) | steam (owners only) |
|---|---|---|
session | signed in | signed in |
player | signed in, a guest too | a copy of the game on Steam (its own, or one lent: family sharing, a free weekend), not banned by the publisher |
creator | an account, no guest | a copy of its own for good, not banned: a lent copy plays, never creates |
An entitlement is what Steam said of an account's copy when it was last asked: at every sign-in through Steam, on demand when a caller needs it fresher (entitlementOf: creating asks for one at most an hour old), and every day while the account is played (sweepEntitlementsEvery: those signed in with in the last 14 days, a refund's window). When Steam cannot be asked, the entitlement stays what it was.