web/src/features/entitlements/README.md
This feature allows to control for availability of features. Entitlements are managed on the organization level.
Plan: A plan is a a tier of features. Eg. oss, cloud:pro, self-hosted:enterprise. They are managed in plans.ts.Entitlement: An entitlement is a feature that is available to a user. Eg. playground. They are managed in constants/entitlements.ts. entitlements.ts also includes the mapping of entitlements to plans.
EntitlementLimit: An entitlement limit is a limit on the number of resources that can be created/used. Eg. annotation-queue-count. They are managed in constants/entitlements.ts.environment as selfHostedInstancePlangetSelfHostedInstancePlanServerSideusePlangetOrganizationPlanServerSide based on cloudConfig, or getSelfHostedInstancePlanServerSide for instance-level planhooks.ts make entitlements of current organization available to the components.hasEntitlement.ts and hasEntitlementLimit.ts allow to check for entitlements and entitlement limits given a session user object.