Skip to content

D31 · Who sees margin, company amounts, NIK and phone

Accepted · 2026-10-08 · zuki · Closes OQ9

Decision: margin and company_amount, wherever they appear, are read only with a new permission, payment:margin. That covers charges and payouts, since a payout's amounts are company_amount totals. The system roles super_admin, admin and finance hold it. viewer and every other role don't, and a super_admin can still grant or deny it to one member with an override.

NIK and phone stay as in v1: every role that can read a driver sees them in full, because checking them against the KTP photo is part of that role's work. They stay masked in the audit log (R-AUD-06).

Why: company_amount is what each rental company is paid, so with the charge amount it shows the company's margin on every rental. Only the people who price, pay out and manage need it. NIK and phone are different: hiding them would stop a checker comparing them with the KTP. Personal data is protected by limiting who can read drivers at all, and by masking in the audit log, not by masking on screen.

Consequences: The permission catalogue gains payment:margin. R-ACC-25 and R-ACC-27, which count today's codes and grants, are retired and replaced, and payouts need payment:margin as well as payment:read (R-MON-34). The Docs Engineer writes these rules (#113).

The Backend Engineer builds the limit in M6's pack: charges and payouts are read through views that leave margin and company_amount empty for a reader without payment:margin. apps/web shows those figures only when my_permissions() includes it. No real money data reaches v2 before the data phase, so nothing is exposed in the meantime.