Tanstack Start
Fleet & tracking

Permissions and access

Route guards and CanI checks for Fleet & tracking.

Access is enforced in two layers: route wrappers that redirect if you lack permission, and CanI checks that hide specific buttons or sections.

Live tracker

  • Route guard: view_vehicle (any of the checked permissions on the live tracker route uses a single code: view_vehicle).
  • Redirect: /dashboard if denied.

Vehicles

List and detail

  • Vehicles list route: view_vehicle (mode any when multiple codes are used elsewhere on the same pattern; here the list route checks view_vehicle).
  • Vehicle detail layout: view_vehicle; redirect to /dashboard/fleet-management/vehicles if denied.

Create, edit, delete

  • Add vehicle button: create_vehicle and all of list_vehicle_type, list_device, list_nationality (form needs those list APIs for comboboxes).
  • Edit vehicle (row menu): update_vehicle and the same form-related list permissions.
  • Delete vehicle: delete_vehicle.

Vehicle detail sections

  • Geofence block: view_vehicle_geofence (entire section is wrapped).
  • Add geofence (toolbar +): create_vehicle_geofence and list_geofence.
  • Edit geofence (row menu): update_vehicle_geofence and list_geofence.
  • Delete geofence (row menu): delete_vehicle_geofence.
  • Assigned drivers block: view_vehicle_driver_assignment.
    • Add assignment: create_vehicle_driver_assignment and list_user.
    • Edit assignment: update_vehicle_driver_assignment and list_user.
    • Delete assignment: delete_vehicle_driver_assignment.

Devices

List and detail

  • Devices list route: view_device; redirect /dashboard.
  • Device detail layout: view_device; redirect /dashboard/fleet-management/devices if denied.

Create, edit, delete

  • New device button: create_device and list_device_type.
  • Edit (row menu): update_device and list_device_type.
  • Delete: delete_device.

Device sensors (Teltonika)

  • Sensors tab appears only when the device type code is Teltonika and you have view_sensor.
  • Sensors route (.../sensors): view_sensor; redirect to the device’s parent devices list if denied.
  • Add sensor: create_sensor and list_sensor_type and list_device_parameter.
  • Edit sensor: update_sensor and list_sensor_type and list_device_parameter.
  • Delete sensor: delete_sensor.

Vehicle history

The history tab does not add extra frontend permission gates beyond being able to open the vehicle (view_vehicle). Fuel, camera, and stops data still depend on telemetry, device capabilities, and backend responses—you may see empty states if nothing is available for the selected range.

Fleet data is organization- and group-scoped like the rest of the console. If records are missing, confirm the correct organization and group context in the header before troubleshooting APIs.

On this page