Skip to content

D100 · The all-rental-companies flag is its own control, and an empty list is a scope like any other

Proposed · 2026-11-13 · zuki, in the team session on #621; it binds when this page's pull request is merged · Applies to access (ACC), migration (MIG) · Partly supersedes D99: the tab no longer shows the flag as every box ticked · Partly superseded by D108: the control and the read-only line no longer name the operator's own cars

Decision: The Rental companies tab gives the flag of D99 through a control of its own, "Semua perusahaan rental, termasuk mobil milik operator". While it is on, every company box shows ticked and can't be changed. Turning it off for a member who has the flag starts a list with every company ticked. Ticking every box by hand saves a list, not the flag. An empty list narrows a member's scope rather than lifting it, so a manager without the flag may save or invite with an empty list, and a member with an empty list is within every such manager's set. A viewer who can't change a member with the flag sees the flag as a line of text, "Melihat semua perusahaan rental dan mobil milik operator.", not as boxes. The v1 migration gives the flag to a login whose allowed_partners all map to rental companies that don't move, as it does to a login with none. Saving an empty list, giving the flag, and sending an invitation with no rental company ticked each ask to confirm.

Why: Under D99 the flag is more than a list of every company: only it shows the operator's own cars and companies added later. Ticking every box by hand would grant both without saying so. An empty list used to lift the limit, so a scoped manager was refused it; now it means no cars, which is within any manager's authority. A scoped manager is offered only their own companies as boxes, so showing the flag as ticked boxes to them would misstate it. A login whose companies all drop had no limit in the old reading, and D99 says no moved login loses cars.

Consequences:

  • R-ACC-150 and 151 refuse a manager without the flag giving the flag, not an empty set; the key stays access.scope_limit_required. R-ACC-156: an invitation from an inviter without the flag never carries the flag.
  • R-ACC-152 and 165 to 168: "a non-empty subset" becomes "a subset"; a member with the flag is outside every scoped manager's set.
  • A manager is scoped when they don't have the flag, including one with an empty list.
  • R-ACC-148's confirm moves to the two saves above.
  • R-ACC-76: allowed_partners absent, empty, or all dropped gives the flag; partly dropped gives a list of the companies that move.