Files
zeekayandHanzo Dev c8e6074ec7 test(billing): the IDOR card specs change cards as a member allowed to
Seven card-mutation specs in test/api/billing failed since 2944b955a ("only an
org's admins change its auto-reload and cards"), hidden because the go-unit
step before them was red on every run. Their "non-privileged" caller is a
member billed from the org's pool, whom that rule refuses 403 before the :id is
read, so the specs no longer reached the IDOR guard they are about.

The nonpriv caller is now a member paying from their own person wallet
(X-User-Id + X-Billing-Account-Id person:<slug>/<name>), whom the wallet rule
lets change cards; the guard confines it to its own subject (404 for another's,
200 for its own) exactly as the specs claim. Reads never consult the wallet and
are unchanged. New specs pin the pool member: every card change, detach and
default is 403, the same for a card that does not exist, and nothing moves.
Mutation-checked: lifting the wallet rule fails all three.

Co-authored-by: Hanzo Dev <[email protected]>
2026-11-12 14:19:50 -08:00
..
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00