GATE · Gate
One gate pass is one trip through the pool's gate, with its IN and OUT on the same row. On the way out, the exit check looks at the car's checkpoint, its service and the driver's debt; each failing aspect needs its own approval. Code GATE.
Not yet a rule
Section titled “Not yet a rule”These questions are open in #85. Each gets a rule with a new ID once it is answered.
- GATE open 1 · The exit check
R-GATE-01 · A gate pass records a time in, a time out, or both
Section titled “R-GATE-01 · A gate pass records a time in, a time out, or both”- Status: planned
- Example: given a new gate pass, when it is saved with neither in_at nor out_at, then it is refused; a pickup with out_at only is accepted.
- Refusal: none: check_violation (23514).
- Who: every writer.
- Source: [Ref] Data model V13: gate_passes.
R-GATE-02 · A gate pass has at most one approval per aspect (checkpoint, service, debt)
Section titled “R-GATE-02 · A gate pass has at most one approval per aspect (checkpoint, service, debt)”- Status: planned
- Example: given a pass whose debt aspect a finance user approved, when a second debt approval is saved on it, then it is refused.
- Refusal: none: unique_violation (23505).
- Who: every writer.
- Source: [Ref] Data model V13: gate_pass_approvals.
R-GATE-03 · Reading gate passes needs gate:read at their pool
Section titled “R-GATE-03 · Reading gate passes needs gate:read at their pool”- Status: planned
- Example: given an admin_driver at PML, who holds gate:approve but not gate:read, when she reads gate_passes, then nothing comes back; a satpam at PML sees them.
- Refusal: none: hidden.
- Who: super_admin, admin, maintenance, asuransi, checker, satpam and viewer hold gate:read.
- Source: [Ref] Roles, policy matrix.
R-GATE-04 · Recording a car in or out at the gate needs gate:read at the pool
Section titled “R-GATE-04 · Recording a car in or out at the gate needs gate:read at the pool”- Status: planned
- Example: given a satpam at PML, when he records a car going out, then the pass is saved; a satpam scoped to SBY can't record it at PML.
- Refusal: none: insufficient_privilege (42501) on insert; no effect on update.
- Who: super_admin, admin, maintenance, asuransi, checker, satpam and viewer hold gate:read.
- Source: [Ref] Roles, policy matrix (gate:read records in / out).
R-GATE-05 · Approving an aspect of a gate pass needs gate:approve at its pool
Section titled “R-GATE-05 · Approving an aspect of a gate pass needs gate:approve at its pool”- Status: planned
- Example: given a satpam at PML, when he approves the debt aspect, then it is refused; a finance user at PML may.
- Refusal: none: insufficient_privilege (42501).
- Who: super_admin, admin, admin_driver, finance, maintenance, asuransi and checker hold gate:approve.
- Source: [Ref] Roles, policy matrix.
R-GATE-06 · The exit check's debt aspect fails when the driver has a balance overdue past overdue_limit_days
Section titled “R-GATE-06 · The exit check's debt aspect fails when the driver has a balance overdue past overdue_limit_days”- Status: planned
- Example: given overdue_limit_days is 3 and a charge due on 2026-10-01 still open, when the driver's car goes out on 2026-10-05, then the debt aspect fails; on 2026-10-04 it passes.
- Refusal: none yet: the key is named with the gate functions (M5).
- Who: the gate exit check (M5).
- Source: D9 (S1); R-MON-08 defines overdue.
R-GATE-07 · When a car goes out, its gate pass keeps the debt, checkpoint age and service flag the exit check saw
Section titled “R-GATE-07 · When a car goes out, its gate pass keeps the debt, checkpoint age and service flag the exit check saw”- Status: planned
- Example: given a driver owing Rp 450.000 when his car goes out, when he pays the next day, then the pass still reads snap_debt 450000.
- Refusal: none.
- Who: the gate exit check (M5).
- Source: [Ref] Data model V13: gate_passes (snap_debt, snap_cp_days, snap_service_due).