feat: DLID licensing system — tables, models, update endpoint #658
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary\n\nCloses #617, #618, #619, #620, #621\n\nPhase 1+2 of the consumer DLID licensing system:\n\n### Database (v359 migration)\n- 5 new tables: license, license_entitlement, license_activation, product_tier, license_audit_log\n- 13 seeded product tiers (base → enterprise)\n- Composite unique indexes on (license_id, product_code) and (license_id, domain)\n\n### Models (models/licensing/)\n- License: DLID generation (CRC32 checksum), CRUD, status transitions\n- Entitlement: tier-based rebuild with custom entitlement preservation\n- Activation: domain tracking with upsert and limit enforcement\n- ProductTier: tier hierarchy with JSON repo lists\n- AuditLog: status and tier change tracking\n\n### API Endpoint\n-
GET /api/v1/licensing/updates/{product}.xml?dlid=XXX&domain=YYY\n- Validates DLID, checks license + entitlement, auto-activates domain\n- Returns Joomla-compatible update XML or empty<updates/>on failure\n\n## Test plan\n- [ ] Migration runs on fresh and existing databases\n- [ ] DLID generation produces valid checksummed keys\n- [ ] Tier change rebuilds entitlements, preserves custom ones\n- [ ] Domain limit enforcement works\n- [ ] Update endpoint returns valid XML for entitled products\n- [ ] Invalid DLID returns empty updates (no error)GET /api/v1/licensing/updates/{product}.xml?dlid=XXX&domain=YYY Validates DLID format (CRC32), checks license status and entitlement, auto-activates domain, returns Joomla-compatible update XML from the entitled repo's stable release. Invalid/expired returns empty <updates/>.Pull request closed