Tenant Editions Management
Admin guide for managing tenant editions in Lager Guru.
Overview
Super-admins can assign and manage editions for all tenants. Editions control which modules and features are available to each tenant.
Accessing Tenant Editions
- Login as super-admin
- Navigate to
/admin→ Tenant Editions - View all tenants and their current editions
Assigning Editions
Via UI
- Open Tenant Editions page
- Find tenant in the list
- Select edition from dropdown:
- FREE: Basic features
- PRO: Advanced features (no AI)
- ENTERPRISE: All features including AI
- Edition updates immediately
Via Database (Service Role)
sql
-- Assign PRO edition to tenant
INSERT INTO tenant_editions (tenant_id, edition_id, assigned_by)
SELECT
'tenant-uuid-here',
e.id,
'admin-user-uuid'
FROM editions e
WHERE e.name = 'pro'
ON CONFLICT (tenant_id)
DO UPDATE SET
edition_id = EXCLUDED.edition_id,
assigned_by = EXCLUDED.assigned_by,
assigned_at = now();Edition Matrix
FREE Edition
Available Modules:
- Dashboard
- Shipments
- Drivers
- Basic Settings
Limits:
- 10 pick lists
- 5 zones
- 3 workers
- 5 drivers
PRO Edition
Available Modules:
- All FREE modules
- Inventory Management
- Pick & Pack
- Maintenance
- Safety & Compliance
- Equipment Tracking
- Auto Assignment
- Routing Engine
Limits:
- 100 pick lists
- 50 zones
- 20 workers
- 30 drivers
ENTERPRISE Edition
Available Modules:
- All PRO modules
- Floor Plan Visualization
- Slotting AI
Limits:
- Unlimited
Module Access Control
How It Works
Tenant edition is checked on:
- UI component render
- API endpoint access
- Route navigation
If module not available:
- UI: Shows upgrade message
- API: Returns 403 with
MODULE_DISABLEDerror - Route: Shows "Module unavailable" page
Module Names
inventory- Inventory Managementpickpack- Pick & Packfloorplan- Floor Plan VisualizationslottingAI- Slotting AImaintenance- Maintenance Modulesafety- Safety & ComplianceequipmentTracking- Equipment TrackingautoAssignment- Auto Assignment Enginerouting- Routing EnginesystemSettings- System Settings
Audit Logging
All edition changes are logged to audit_log table:
- Table:
tenant_editions - Action:
UPDATE - Details: Includes
edition_idandassigned_by
Best Practices
- Default to FREE: New tenants start with FREE edition
- Upgrade Gradually: Start with FREE, upgrade as needed
- Monitor Usage: Check if tenants are hitting limits
- Document Changes: Note why edition was changed
- Test Before Upgrade: Verify features work after upgrade
Troubleshooting
Tenant Can't Access Module
Check tenant's edition:
sqlSELECT e.name FROM tenant_editions te JOIN editions e ON e.id = te.edition_id WHERE te.tenant_id = 'tenant-uuid';Verify module is included in edition
Check if module name is correct
Clear browser cache if UI issue
Edition Not Updating
- Verify super-admin permissions
- Check RLS policies allow update
- Verify
edition_idexists ineditionstable - Check audit log for errors
Limits Not Enforcing
- Verify limit checking code is in place
- Check
getEditionLimits()returns correct values - Ensure
checkLimit()is called before operations
Related Documentation
- Editions Overview - Product documentation
- Multi-Tenant Architecture - Architecture