Skip to content

TRF · Pool transfers

A car or a driver moves pool only by a request that is approved. A driver's charges and payments follow him (R-MON-27), and a driver books only cars of his own pool (R-RNT-04). Code TRF.

These questions are open in #78. Each gets a rule with a new ID once it is answered.

  • TRF open 1 · Requesting a transfer

R-TRF-01 · A car's home pool or a driver's pool changes only by completing an approved transfer

Section titled “R-TRF-01 · A car's home pool or a driver's pool changes only by completing an approved transfer”
  • Status: planned
  • Example: given a driver at PML, when an admin updates his pool to SBY directly, then it is refused; a transfer requested, approved and completed moves him.
  • Refusal: none yet: the key is named with the transfer functions (M2, M3).
  • Who: every app user.
  • Source: [Ref] Roles, The hierarchy (pool transfers: request → approve); [Ref] Data model V13: pool_transfers.

R-TRF-02 · A transfer's from pool and to pool differ

Section titled “R-TRF-02 · A transfer's from pool and to pool differ”
  • Status: planned
  • Example: given a car at PML, when a transfer from PML to PML is saved, then it is refused.
  • Refusal: none: check_violation (23514).
  • Who: every writer.
  • Source: [Ref] Data model V13: pool_transfers.

R-TRF-03 · A transfer moves exactly one car or exactly one driver

Section titled “R-TRF-03 · A transfer moves exactly one car or exactly one driver”
  • Status: planned
  • Example: given a transfer with subject vehicle, when it is saved with a driver and no car, then it is refused.
  • Refusal: none: check_violation (23514).
  • Who: every writer.
  • Source: [Ref] Data model V13: pool_transfers.
  • Status: planned
  • Example: given a new transfer, when it is saved with no reason, then it is refused.
  • Refusal: none: not_null_violation (23502).
  • Who: every writer.
  • Source: [Ref] Data model V13: pool_transfers.

R-TRF-05 · Approving a transfer needs transfer:approve at its from pool or its to pool

Section titled “R-TRF-05 · Approving a transfer needs transfer:approve at its from pool or its to pool”
  • Status: planned
  • Example: given a transfer from PML to SBY, when an admin scoped to SBY approves it, then it is approved; an admin_driver can't approve it.
  • Refusal: none: no effect without the permission.
  • Who: super_admin and admin hold transfer:approve.
  • Source: [Ref] Roles, policy matrix.

R-TRF-06 · Reading a transfer needs vehicle:read or driver:read at its from pool or its to pool

Section titled “R-TRF-06 · Reading a transfer needs vehicle:read or driver:read at its from pool or its to pool”
  • Status: planned
  • Example: given a transfer from PML to SBY, when a viewer scoped to SBY reads pool_transfers, then it comes back; a viewer scoped to a third pool sees nothing.
  • Refusal: none: hidden.
  • Who: super_admin, admin, admin_driver, admin_fleet, maintenance, asuransi, checker and viewer hold vehicle:read or driver:read.
  • Source: [Ref] Roles, policy matrix.