Skip to content

ACC · v1's access in the migration

Every v1 login moves to v2 with its password, one membership, its v1 role's system role, its grants and denies renamed to v2's codes, its allowed pages and its rental companies. This page holds those steps of the migration and the table they rename v1's permissions through. Part of Access, code ACC.

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

  • v1's implied pages with no v2 code (#278): v1's IMPLIED_BY also gives holders of payment:read etle:read, and holders of payment:write etle:write, rental:write, aktivasi:read and aktivasi:write. v2 has no code for them. ETLE already opens with payment:read. As of 2026-11-06 two v1 logins are denied these names explicitly, and none is granted them: a viewer is denied etle:read, and an admin aktivasi:write, etle:write and rental:write. TL-DP-04's run 1 on staging stopped on them (#187, R-MIG-02). zuki, 2026-11-06: aktivasi in v1 is bill and charge activation, a finance action every finance person should be able to do, so aktivasi:write gives payment:write; etle:read, etle:write and rental:write give no v2 code for now, as car:delete does (D39). R-ACC-71 carries them. Real v2 codes for ETLE and rental:write come later in #562 (D75). zuki, 2026-11-09, on #570: aktivasi:read gives payment:read, as aktivasi:write gives payment:write; R-ACC-71 carries it.
  • v1's gate:read and gate:write (#278): zuki, 2026-10-26, "leave it". R-ACC-71 stands: a v1 grant or deny of gate:read gives gate:read only, never gate:write.
  • v1's allowed_modules (37 logins, #278): zuki, 2026-10-27: translate each page into the v2 permission that opens it, so no user loses a page they see in v1. R-ACC-81, with the table of v1 menu paths below.
  • What v1 implied from payment:read and payment:write (#278): zuki, 2026-10-27: a v1 grant keeps the pages v1 implied from it, R-ACC-82 and R-ACC-83.
  • The five v1 permission names that no table row named (collection:read, rental:read, txlist:read, txlist:write, opname:write; #278): all five are denies in v1's data. zuki, 2026-10-27, "go" to matching v1 one to one, so v2 gets a code for each (D75) and a v1 grant or deny gives a grant or deny of it: R-ACC-77 to R-ACC-80. opname has its code and rules with Stock Opname.

v1's permissions renamed to v2's codes, and the v1 menus each one opens. R-ACC-87 gives the 11 system roles their v1 permissions through this table, R-ACC-71 moves v1's grants and denies through it, and the per-role menu check (R-APP-25) compares each role's menu with its v1 role's through it. The code is what row-level security and the app check; the label each code shows in Users & roles is on the generated roles page. From #59 (item 1) and #189, copied from [Ref] Roles, permissions and row-level security, Permission names: v1 → v2.

v1 v2 Actions v1 menus it opens
lead driver read, write, delete Lead Registration, Driver Dashboard, Profil Driver (leads are drivers in v2)
antrian queue read Antrian Pendaftaran
bc screening read, write, approve Background Check
onboarding onboarding read, write, approve Onboarding
assign booking read, write Assign Unit (book a car and sign the contract)
car vehicle read, write List Vehicle. v1's car:delete has no v2 code (D39)
monitoring fleet_monitor read Vehicle Monitor, Kalender, Notifikasi
checkpoint inspection read, write, handover Pengecekan & Serah Terima
prep preparation read, write Preparation
vprep maintenance read, write Maintenance (v1's old name: vehicle preparation)
workorder work_order read Work Order
asuransi insurance read, write Asuransi
bengkel garage read, write Bengkel
claim debt_letter read, write Surat Klaim (VM), Sanksi
payment payment read, write, approve Pembayaran, ETLE. A login's own v1 aktivasi:read gives payment:read, and aktivasi:write payment:write; its etle:read and etle:write give no v2 code (R-ACC-71, #562)
collection collection read Collection (R-ACC-77)
rental daily_rental read Rental Harian (R-ACC-78). v1's rental:write has no v2 code yet (R-ACC-71, #562)
txlist transaction read, write The transaction list (R-ACC-79)
gate gate read Gate In / Out (read). v1's gate:approve, Admin Approval, has no v2 code: each aspect has its own approval permission (R-ACC-223, R-ACC-227)
dashboard dashboard read Dashboard
report report read Laporan, Dashboard Manajemen
log audit_log read Log Aktivitas
users user read, write, delete Manajemen User. v1's Backup has no v2 page (R-APP-25)
masterdata master_data read, write Master Data
opname opname read, write Stock Opname (R-ACC-88, R-ACC-89)

v2 codes with no v1 permission: transfer:request and transfer:approve (pool transfers, new in v2), gate:write (#144: recording in and out at the gate, which v1's gate:read did), payment:margin (D31), and the five from D63 (R-ACC-63 to R-ACC-66).

The eleven paths v1's allowed_modules holds (BE-DP-21, section 3), each with the v1 menu it shows and the v2 code that opens the same page. R-ACC-81 moves each page a login lists through this table. From BE's reading of the v1 column in apps/web/lib/nav.ts (#329).

v1 path v1 menu v2 code
/dashboard Dashboard dashboard:read
/list-vehicle List Vehicle vehicle:read
/vehicle-monitor Vehicle Monitor fleet_monitor:read
/checkpoints Pengecekan & Serah Terima inspection:read
/preparation Preparation preparation:read
/vehicle-preparation Maintenance maintenance:read
/work-order Work Order work_order:read
/asuransi Asuransi insurance:read
/gate-system/admin Admin Approval none (D96: gate:approve goes; R-ACC-227)
/claim Surat Klaim (VM), Sanksi debt_letter:read
/log-aktivitas Log Aktivitas audit_log:read

R-ACC-58 · Every v1 login moves to v2 with its id and its password hash, so its owner signs in with the same password

Section titled “R-ACC-58 · Every v1 login moves to v2 with its id and its password hash, so its owner signs in with the same password”
  • Status: built
  • Example: given Rina signs in to v1 with their password, when the data phase's access step has run, then they sign in to v2 with the same email and password, as the same user id, and land on the menus their v1 role had (R-APP-25, through the v1 to v2 permission names above); nobody is asked to reset a password.
  • Refusal: none.
  • Who: the migration's access step (data phase), and its reconcile check. The one v1 login it leaves out is the photo reader made for the photo copy (R-ACC-73).
  • Source: D50 (OQ1: "move v1's credentials to the new one, don't reset").

R-ACC-59 · A password moved from v1 keeps working even when it breaks the password rules, until it is next set

Section titled “R-ACC-59 · A password moved from v1 keeps working even when it breaks the password rules, until it is next set”
  • Status: planned
  • Example: given Deka's v1 password is "deka123", which R-ACC-60 and R-ACC-70 would refuse, when they sign in to v2, then it works; when they next change or reset it, the new one must follow the rules.
  • Refusal: none.
  • Who: every login moved by R-ACC-58.
  • Source: D50 (a moved password keeps working even if it breaks D51's rules).

R-ACC-71 · The migration turns each v1 permission name in a user's grants and denies into its v2 code from the v1 to v2 table

Section titled “R-ACC-71 · The migration turns each v1 permission name in a user's grants and denies into its v2 code from the v1 to v2 table”
  • Status: built
  • Example: given a v1 checker whose allowed_perms holds car:write and whose allowed_perms_denied holds bc:read, when the data phase's access step has run, then their membership has a grant override for vehicle:write and a deny override for screening:read. A v1 grant of car:delete gives nothing, as v2 has no such code (D39). Some names have no table row of their own: a v1 grant of aktivasi:read gives a grant override of payment:read, and a deny a deny override of it; aktivasi:write gives payment:write the same way. Each gives its payment code alone, never the codes a v1 grant of payment:read or payment:write implies, as R-ACC-82 and R-ACC-83 key those on v1's own name; etle:read, etle:write and rental:write give nothing until #562 builds their codes, and gate:approve gives nothing, as v2 has no such code (D96, R-ACC-227); repo:read, repo:write and repoexec:read give nothing until M5 builds repossession's codes (R-ACC-66), so a grant of any is dropped, and a deny of any is dropped and listed for zuki's signature (R-MIG-11). A deny of a name that gives nothing stops the access step until zuki signs it (R-MIG-11), so a login never sees what v1 hid. A v1 login whose allowed_perms and allowed_perms_denied hold the same code gets only the deny override of it at each pool, as a member has one override per permission and pool (R-ACC-23); deny wins already (R-ACC-06), so what the login can do is unchanged.
  • Refusal: none.
  • Who: the migration's access step (data phase), and its reconcile check that every v1 user lands on the same menus.
  • Source: the v1 to v2 permission names on this page, from [Ref] Roles, permissions and row-level security, Permission names: v1 → v2; its section "Moving today's users over" (allowed_perms to grant overrides, allowed_perms_denied to deny overrides); build/plan, data phase, the access step; #189. Four of the five names: zuki, 2026-11-06, after TL-DP-04's run 1 stopped on them (#187); aktivasi:read: zuki, 2026-11-09, on #570; the codes of etle and rental:write later in #562 (D75); repoexec:read: zuki, 2026-12-02, on #826 (found by staging's night, #187); a code both granted and denied: the lead in the session on #456.

R-ACC-73 · The access step leaves out v1's photo reader, the login TL-DP-03 made for the photo copy

Section titled “R-ACC-73 · The access step leaves out v1's photo reader, the login TL-DP-03 made for the photo copy”
  • Status: planned
  • Example: given v1 holds its staff logins and the photo reader TL-DP-03 made, when the data phase's access step has run, then every staff login is in v2 (R-ACC-58) and the photo reader isn't, so nobody can sign in to v2 with it; the reconcile's login check counts v1's staff logins against v2's, with the photo reader as its one expected absence, not a difference to explain.
  • Refusal: none.
  • Who: the migration's access step (data phase), and its reconcile check of logins (#278, check 1). The photo reader goes on reading v1's files for the photo copy (R-STO-24); its user id is on #240.
  • Source: D68 (a v1 login made only for the photo copy); #278 (the CTO, 2026-10-22: only v1's staff logins move); #287.

R-ACC-74 · The access step's load ends no sessions: it sets no profile's time of last access change

Section titled “R-ACC-74 · The access step's load ends no sessions: it sets no profile's time of last access change”
  • Status: planned
  • Example: given the access step loads Rina's login, their roles at PML and their grant of vehicle:write, when it has run, then their profile's time of last access change is still empty and no session in v2 has ended, Rina's or anyone's; when a super_admin later changes their roles in v2, their sessions end as R-ACC-08 says.
  • Refusal: none.
  • Who: the migration's access step (data phase), as it loads profiles, memberships, member roles and overrides (R-ACC-58, R-ACC-71). Every change made after the load ends sessions as before (R-ACC-08, R-ACC-52 to R-ACC-54); how the load keeps those triggers quiet is BE's, in the step's pack. The audit log gets one "migrated" entry per table, not one per member (R-AUD-15, R-AUD-16).
  • Source: D37 and D48 (sessions end when a member's access changes; the load moves access a v1 user already had, as R-ACC-55's grant only adds what the system gives); D52; #278 (the triggers must not stamp every migrated member); #287.

R-ACC-75 · The migration gives each moved v1 login one active membership in the organization, holding its v1 role's system role at every pool

Section titled “R-ACC-75 · The migration gives each moved v1 login one active membership in the organization, holding its v1 role's system role at every pool”
  • Status: planned
  • Example: given a v1 checker, when the access step has run, then they are an active member holding checker at PML and at SBY, since v1 had no pools and their role held everywhere (R-ACC-04). A login whose v1 role maps onto no system role isn't moved: it is an unmatched row with the reason "its role maps onto no system role" (R-MIG-04) and gets no login in v2. v1's role repo_team is one: it maps onto no system role until M5 adds the repo role (R-ACC-68), so its login isn't moved, and zuki signs the unmatched line and can invite the person by hand meanwhile (R-ACC-57).
  • Refusal: none.
  • Who: the migration's access step (data phase). The system roles hold their v1 permissions renamed (R-ACC-87); D63's and D71's new roles come with M3 and M5, not here.
  • Source: #278; #287 (BE's proposal); D50; R-ACC-14 (one membership per organization). repo_team: zuki, 2026-12-02, on #826 (found by staging's night, #187).

R-ACC-76 · The migration gives a moved v1 login the list of rental companies its allowed_partners maps to that move, or the flag when that list would be empty

Section titled “R-ACC-76 · The migration gives a moved v1 login the list of rental companies its allowed_partners maps to that move, or the flag when that list would be empty”
  • Status: built
  • Example: given a login whose allowed_partners holds "MitraA", when the access step has run, then MitraA is its only rental company, its membership has no flag, and it sees only MitraA's cars (R-ACC-43). A login whose allowed_partners is absent or empty gets the flag and sees every car of its pools (R-ACC-42), so no moved login loses cars it saw in v1. So does a login whose partners all map onto companies that don't move. A login with "MitraA" and a partner whose company doesn't move gets MitraA alone, without the flag. A login with a partner that has no value_map row isn't moved: no step runs while the value is unmapped (R-MIG-02).
  • Refusal: none.
  • Who: the migration's access step (data phase), through value_map for each partner's name (R-MIG-02).
  • Source: #278 (partner scope); #287 (BE's proposal); D99 (no allowed_partners gives the flag, not an empty list); D100 (absent, empty or all dropped gives the flag). It gave a login with no list no rental company, which meant no limit.

R-ACC-81 · The migration turns each page in a v1 login's allowed_modules into the code that opens that page in v2, so the login still sees it

Section titled “R-ACC-81 · The migration turns each page in a v1 login's allowed_modules into the code that opens that page in v2, so the login still sees it”
  • Status: retired (replaced by R-ACC-227: /gate-system/admin gives no code since D96, so not every page is kept)
  • Example: given a v1 finance login whose allowed_modules holds /dashboard and /claim, when the access step has run, then it has grants of dashboard:read and debt_letter:read at every pool, which its role doesn't give (the finance role holds neither). A page its role already opens gives no grant. A page that v1 also denied stays denied (R-ACC-06), and the reconcile lists the login with the page's path and code.
  • Refusal: none. A path with no row in the table of v1 menu paths stops the night (R-MIG-02).
  • Who: the migration's access step (data phase), for the 37 v1 logins that have the list. One entry grants an action as well as a page: /gate-system/admin gives gate:approve.
  • Source: zuki on #278 (2026-10-27: translate allowed_modules into v2's own permissions, so no user loses a page they see in v1; and "for the 2 logins, yes" to /gate-system/admin giving gate:approve); R-APP-25 (a page opens with one permission); BE's proposal on #328 and #329.

R-ACC-82 · A v1 grant of payment:read also grants the pages v1 implied from it: collection:read, daily_rental:read and transaction:read

Section titled “R-ACC-82 · A v1 grant of payment:read also grants the pages v1 implied from it: collection:read, daily_rental:read and transaction:read”
  • Status: built
  • Example: given a v1 checker granted payment:read, when the access step has run, then they have grants of payment:read, collection:read, daily_rental:read and transaction:read at every pool. A deny doesn't expand: a v1 finance login denied payment:read keeps its role's collection:read, as in v1, where the role held it explicitly.
  • Refusal: none.
  • Who: the migration's access step (data phase), for grants in allowed_perms.
  • Source: zuki on #278 (2026-10-27, 03:44: v1's hasPermission() grants the pages through IMPLIED_BY, so holders of the old payment permissions keep Finance page access); BE's wording on #328; R-ACC-71.

R-ACC-83 · A v1 grant of payment:write also grants transaction:write, which v1 implied from it

Section titled “R-ACC-83 · A v1 grant of payment:write also grants transaction:write, which v1 implied from it”
  • Status: built
  • Example: given a v1 checker granted payment:write, when the access step has run, then they have grants of payment:write and transaction:write at every pool. A deny doesn't expand.
  • Refusal: none.
  • Who: the migration's access step (data phase), for grants in allowed_perms.
  • Source: as R-ACC-82. Split from BE's proposed R-ACC-82, which stated both: one rule, one testable statement.

R-ACC-227 · The migration turns each page in a v1 login's allowed_modules into the code that opens that page in v2, except /gate-system/admin, which gives none

Section titled “R-ACC-227 · The migration turns each page in a v1 login's allowed_modules into the code that opens that page in v2, except /gate-system/admin, which gives none”
  • Status: built
  • Example: given a v1 finance login whose allowed_modules holds /dashboard, /claim and /gate-system/admin, when the access step has run, then it has grants of dashboard:read and debt_letter:read at every pool and nothing for /gate-system/admin; finance's role gives gate_debt:approve already (R-ACC-223). A page its role already opens gives no grant, and a page v1 also denied stays denied (R-ACC-06). A v1 grant of gate:approve gives nothing (R-ACC-71), and a v1 deny of it is a dropped deny, which zuki signs (R-MIG-11) before the step runs.
  • Refusal: none. A path with no row in the table of v1 menu paths stops the night (R-MIG-02).
  • Who: the migration's access step (data phase), for the 37 v1 logins that have the list.
  • Source: zuki on #278 (2026-10-27: translate allowed_modules into v2's own permissions); D96; #593 (gate:approve goes; v1's gate:approve maps to none). Replaces R-ACC-81.