Licenses
Backoffice path: backoffice/licenses
Available to roles: System Administrator, Administrator; Operations Staff can view and assign
Overview
Licenses represent certifications and qualifications that pilots obtain or purchase. They serve as gatekeeping mechanisms -- specific fleets, subfleets, aircraft, airports, or schedules can require a license, and only pilots who hold an active license are permitted to book those resources.
License Fields
| Field | Description |
|---|---|
| Name | Display name of the license (e.g., "ETOPS Certification", "CAT III ILS Approach"). |
| Slug | Auto-generated URL-safe identifier. |
| Description | Detailed description of what the license certifies. |
| Cost (Points) | The Points price a pilot pays to purchase this license. |
| Purchasable | Toggle controlling whether pilots can buy this license themselves. When disabled, the license can only be assigned by staff. |
| Active | Toggle controlling whether the license is currently in use. Inactive licenses are hidden from pilots. |
Pilot License Status
Each pilot-license relationship tracks the following:
| Field | Description |
|---|---|
| Status | Current state: active, expired, or pending_renewal. |
| Issued At | Timestamp of when the license was first granted. |
| Expires At | Timestamp of when the license will expire (if renewal conditions apply). |
| Last Renewed At | Timestamp of the most recent renewal. |
| Issued By | The staff member who assigned the license (for staff-assigned licenses). |
Renewal Conditions
Licenses can have renewal conditions attached that pilots must satisfy to keep their license active. Each condition is defined with:
| Field | Description |
|---|---|
| Type | The kind of condition: flight-hours, flight-count, or other custom types. |
| Parameters | A JSON object containing the specific thresholds or criteria (e.g., {"hours": 50} or {"count": 10, "fleet": "B737"}). |
| Interval (days) | How often the condition is evaluated (the renewal cycle length in days). |
| Description | Human-readable description of the renewal requirement. |
| Active | Toggle to enable or disable this specific condition. |
Renewal Evaluation
A daily background job evaluates all licenses with active renewal conditions:
- Non-payment conditions are checked first -- the system verifies flight hours, flight counts, or other activity-based requirements.
PAY_POINTSconditions are checked last -- Points are only deducted if all other conditions have been met. This ordering prevents pilots from losing Points on a renewal that would fail anyway due to unmet activity requirements.- If all conditions pass, the license is renewed and
expires_atis extended. - If any condition fails, the license transitions to expired or pending_renewal status.
Restriction Enforcement
Licenses can be required for access to specific resources. When a restriction is configured, pilots must hold an active license to book or fly:
- Fleets -- require a license for an entire fleet type (e.g., all Boeing 737 variants).
- Subfleets -- require a license for a specific subfleet (e.g., B737-800 only).
- Aircraft -- require a license for a specific individual aircraft.
- Airports -- require a license to depart from or arrive at specific airports.
- Schedules -- require a license for specific scheduled routes.
Restrictions are enforced at booking time. If a pilot does not hold the required active license, the booking is denied with an informative error message.
Activity Log
The license edit page includes a paginated activity log that records every change to the license's attributes (name, cost, purchasable status, active status, etc.) with timestamps and the staff member who made the change.
Staff Actions
Administrators and authorized staff can perform the following actions:
| Action | Description |
|---|---|
| Create | Define a new license type with its fields and renewal conditions. |
| Edit | Modify an existing license's properties, cost, or renewal conditions. |
| Delete | Remove a license type entirely (use with caution -- affects all holders). |
| Assign to user | Grant a license to a specific pilot, setting its status to active. |
| Revoke from user | Remove a license from a specific pilot. |
| View all holders | See a list of all pilots who hold (or have held) a specific license, with their current status. |