Since D31 · vehicle reads, history and cross-pool work (#77)
The answers to #77, VEH open 1 to 3, decided by zuki on 2026-10-09. VEH open 3 was answered twice that day: first as a fixed refusal (R-VEH-19), then as an organization switch, off by default, that refuses cross-pool work while it is off (R-SET-07, R-VEH-20). R-VEH-19 is retired.
Changes to rules on the domain pages
Section titled “Changes to rules on the domain pages”These take effect when the audit is done. Until then the domain pages stay as written.
- Vehicles: VEH open 1 to 3 leave "Not yet a rule"; their answers are R-VEH-17, R-VEH-18, R-SET-07, R-VEH-20 and R-GATE-08. The contract_status rename (OQ10, #36) stays open.
- Vehicles: R-VEH-10 (no pool given: the car's home pool) is unchanged; R-VEH-20 adds that a different pool is refused while cross-pool work is switched off.
- Settings: R-SET-07 adds a setting to the organization's row. R-SET-02 is unchanged: the switch can't be set per pool.
Not yet a rule
Section titled “Not yet a rule”- What the switch does when it is on. Today a pool given while it is on is kept, and nothing in the app turns it on. What "on" means beyond that waits for a decision when a client asks for it. zuki's condition for it (#77, 2026-10-09): whoever can read a car at its home pool still sees the car's full history, including gate passes, inspections and work orders done at other pools.
New rules
Section titled “New rules”R-VEH-17 · inspection:read, work_order:read or insurance:read at a car's home pool lets a user read the car, but not change it
Section titled “R-VEH-17 · inspection:read, work_order:read or insurance:read at a car's home pool lets a user read the car, but not change it”- Status: built
- Example: given a maintenance user at PML, who holds work_order:read, when they read vehicles, then PML's cars come back; when they edit a car's color, nothing changes, because that needs vehicle:write (R-VEH-12).
- Refusal: none: hidden without one of them.
- Who: super_admin, admin, admin_fleet, maintenance, asuransi, checker and viewer hold at least one of them.
- Source: #77 (VEH open 1); [Ref] Roles, policy matrix (vehicle:read and other vehicle-facing reads). R-VEH-14 to R-VEH-16 cover vehicle:read, gate:read and fleet_monitor:read.
R-VEH-18 · App users can't insert, change or delete vehicle status history; only the status function writes it
Section titled “R-VEH-18 · App users can't insert, change or delete vehicle status history; only the status function writes it”- Status: built
- Example: given an admin_fleet, when they insert a vehicle_status_history row or edit an old one, then nothing is saved; a status change through app.set_vehicle_status writes its row (R-VEH-07). An anomaly is fixed by a migration or by zuki directly in the database, never from the app.
- Refusal: none: insufficient_privilege (42501) on insert; no effect on update or delete.
- Who: every app user, super_admin included.
- Source: #77 (VEH open 2); D9 (P9).
R-VEH-19 · An inspection, work order or gate pass of a car carries the car's home pool; a different pool is refused
Section titled “R-VEH-19 · An inspection, work order or gate pass of a car carries the car's home pool; a different pool is refused”- Status: retired (replaced by R-SET-07 and R-VEH-20: zuki made the refusal a switch, later in #77)
- Example: given a car whose home pool is PML, when a satpam at SBY records it entering the SBY gate, or an inspection of it is saved with pool SBY, then it is refused; to be handled at SBY the car is transferred first (R-TRF-01). A guest's gate pass, with no car, isn't affected.
- Refusal: a key named by BE in pack B, such as vehicle.pool_mismatch.
- Who: every writer.
- Source: #77 (VEH open 3); D9 (P5). Changes what pack B does today (DOC-Q9: a given pool was kept). Revisiting it, so a car can be handled at another pool, would take a new decision.
R-SET-07 · An organization's allow_cross_pool_operations setting is off unless it is switched on
Section titled “R-SET-07 · An organization's allow_cross_pool_operations setting is off unless it is switched on”- Status: built
- Example: given a new organization, when its settings are read, then allow_cross_pool_operations is false. OptimaPerkasa keeps it off.
- Refusal: none.
- Who: every organization. It is set for the whole organization, not per pool (R-SET-09), with master_data:write (R-SET-05).
- Source: #77 (VEH open 3, zuki's update of 2026-10-09); D32 (a behaviour that differs between clients is an organization setting). It works like allow_cross_entity_payments (R-MON-18).
R-VEH-20 · While allow_cross_pool_operations is off, an inspection, work order or gate pass of a car can't be given a pool other than the car's home pool
Section titled “R-VEH-20 · While allow_cross_pool_operations is off, an inspection, work order or gate pass of a car can't be given a pool other than the car's home pool”- Status: built
- Example: given a car whose home pool is PML and the setting off, when a satpam at SBY records it entering the SBY gate, or an inspection of it is saved or moved to pool SBY, or a work order at SBY is moved onto it, then it is refused with the detail {"vehicle_id": "…", "home_pool_id": "…", "pool_id": "…"}. With no pool given, the row takes PML (R-VEH-10). To work on the car at SBY, it is transferred first (R-TRF-01).
- Refusal: vehicle.cross_pool_blocked
- Who: every writer. It is checked where the pool is filled in, on insert and on any change of pool or car; row-level security still decides only who sees and writes at which pool.
- Source: #77 (VEH open 3, zuki's update of 2026-10-09); D9 (P5). Replaces R-VEH-19.
R-GATE-08 · A guest's gate pass, with no car, keeps the pool it is given
Section titled “R-GATE-08 · A guest's gate pass, with no car, keeps the pool it is given”- Status: built
- Example: given a supplier's van with no vehicle row, when a satpam at SBY records it entering, then the pass is saved at SBY, whatever allow_cross_pool_operations is.
- Refusal: none.
- Who: every writer of gate passes.
- Source: #77 (the Backend Engineer's note on guest passes); [Ref] Data model V13: gate_passes (vehicle empty for guests).