docs: update changelogs for billing overrides and interface stats fix

This commit is contained in:
Graham McIntire 2026-03-06 13:02:55 -06:00
parent cc53dd6a64
commit e161aaab83
No known key found for this signature in database
2 changed files with 33 additions and 0 deletions

View file

@ -1,3 +1,30 @@
2026-03-06
feat: per-organization billing override admin UI
- Add custom_free_device_limit and custom_price_per_device nullable fields to organizations
- Add billing_override_changeset/2 with validation (separate from main changeset)
- Add effective_device_limit/1 to SubscriptionLimits respecting custom overrides
- Add effective_free_device_count/1 and effective_price_per_device/1 to Billing
- Update billable_device_count and estimated_monthly_cost to use effective values
- Add Admin.update_billing_overrides/4 with audit logging
- Add override editing UI to /admin/organizations with edit panel
- Update org settings page to display effective limits/pricing instead of hardcoded values
Files: priv/repo/migrations/20260306184112_add_billing_overrides_to_organizations.exs,
lib/towerops/organizations/organization.ex,
lib/towerops/organizations/subscription_limits.ex,
lib/towerops/billing.ex,
lib/towerops/admin.ex,
lib/towerops/admin/audit_log.ex,
lib/towerops_web/live/admin/org_live/index.ex,
lib/towerops_web/live/admin/org_live/index.html.heex,
lib/towerops_web/live/org/settings_live.html.heex
fix: access interface stats through latest_stat association
- Template accessed if_in_octets/if_out_octets directly on Interface struct
- These fields live on InterfaceStat (interface.latest_stat)
- Added nil guard to prevent KeyError when association not loaded
- Fixes production 500 error on device detail page
Files: lib/towerops_web/live/device_live/show.html.heex
2026-03-05
feat: add rate limiting to admin endpoints (100 req/min)
- Add :admin type to RateLimit plug with 100 requests per minute per IP

View file

@ -1,3 +1,9 @@
2026-03-06 — Per-Organization Billing Overrides
* Superadmins can now customize free device limits and per-device pricing for individual organizations
* Override management available in the admin organizations panel
* Organization settings page now reflects custom billing terms when set
* Fixed a crash on the device detail page when interface statistics were unavailable
2026-03-05 — Security Enhancements
* Enhanced security for API endpoints and file uploads
* Improved validation for mobile device registration