Skip to content

ACC · Invitations and first sign-in

Nobody signs up: a member joins by an invitation from a holder of user:write, opens its link, sets a first password on /welcome and is signed in (D50, D51, D98). This page holds sending, resending and accepting an invitation, and the rental companies or flag it carries. A login with no membership in any organization, such as a removed member, is invited again by a sign-in link and accepts through accept_invitation(), from the sign-in link or from /no-access (R-ACC-265 to R-ACC-280; D101, D104). Part of Access, code ACC.

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

  • Auth email comes from no-reply@opleet.com through Resend (D51). It is a setting in each hosted project, made by a TL step with M1, not a rule.

R-ACC-57 · A member joins an organization only by accepting an invitation sent by a holder of user:write

Section titled “R-ACC-57 · A member joins an organization only by accepting an invitation sent by a holder of user:write”
  • Status: built
  • Example: given a super_admin of organization A, when they invite rina@example.com as checker at PML, then Rina gets an email, and opening its link gives them a membership in A and checker at PML (R-ACC-93, R-ACC-96); an admin without user:write at PML can't invite to PML, and no invitation, login or email is made.
  • Refusal: invitation.not_allowed (42501), with pool_id, for an invitation sent without user:write at its pool.
  • Who: holders of user:write at the invitation's pool (super_admin among the system roles; R-ACC-17), through invite_member(). The parts are R-ACC-90 to R-ACC-103, and an invitation's flag and rental companies R-ACC-154 to R-ACC-164 and R-ACC-181 to R-ACC-183, with R-ACC-185.
  • Source: D50; D51 (invitations by email); D98 (proposed: Postgres decides, user:write at the pool). Built in M1.

R-ACC-90 · An invitation names one email, one role and one pool, the role and the pool both of the inviter's organization

Section titled “R-ACC-90 · An invitation names one email, one role and one pool, the role and the pool both of the inviter's organization”
  • Status: built
  • Example: given Rina is super_admin of organization A, when they invite deka@example.test as checker at PML, then one pending invitation holds that email, A's checker and PML; an invitation whose role and pool are in different organizations, or whose pool is inactive, is refused, and a second role or pool needs a second invitation (M1-02).
  • Refusal: invitation.role_not_at_pool, with role_id and pool_id.
  • Who: every invitation, through invite_member(). It also carries a list of rental companies, or the flag when the inviter has it (R-ACC-154, R-ACC-181).
  • Source: D98 (proposed: one role at one pool); D50; zuki on #616, 2026-11-12 (the set).

R-ACC-91 · An invitation is refused when its role holds a permission the inviter lacks at its pool

Section titled “R-ACC-91 · An invitation is refused when its role holds a permission the inviter lacks at its pool”
  • Status: built
  • Example: given an organization's own role "kasir" that holds payment:approve, and Rina holds user:write at PML but not payment:approve, when they invite deka@example.test as kasir at PML, then it is refused and no invitation, login or email is made; inviting as a role whose permissions Rina all holds at PML goes through.
  • Refusal: access.grant_not_held, with pool_id and the permission_codes the inviter lacks there, as R-ACC-50.
  • Who: every inviter. R-ACC-50 applied to the role an invitation will grant.
  • Source: D98 (proposed); R-ACC-50 (#144, zuki's answer 7).

R-ACC-92 · An email whose login holds a membership in any organization can't be invited

Section titled “R-ACC-92 · An email whose login holds a membership in any organization can't be invited”
  • Status: built
  • Example: given deka@example.test is a member of organization A, active or suspended, or a member of organization B only, when a super_admin of A invites that email, then it is refused and no invitation or email is made. Given Rina was removed from A (R-ACC-189) and holds no membership in any organization, or a login moved from v1 holds none (R-ACC-58), when a super_admin of A invites that email, then the invitation is made and a sign-in link reaches it (R-ACC-265). The email is compared without regard to case.
  • Refusal: invitation.login_exists, with the email.
  • Who: every inviter. A suspended member is reinstated, not invited again (R-ACC-188); a voided or revoked invitee holds no membership, so they are brought in by Pulihkan on their invitation, which sends a fresh link (R-ACC-286, R-ACC-220), or by a new invitation. Joining a login that is a member of another organization waits for a real case. An email whose only login is from a pending invitation is R-ACC-102: invite_member() checks, in order, user:write (R-ACC-57), the role and pool (R-ACC-90), the grants (R-ACC-91), the rental companies (a null set, then R-ACC-156, R-ACC-160, R-ACC-157, R-ACC-158 and R-ACC-159, as R-ACC-154 says), the address (R-ACC-103), a pending invitation of this organization (R-ACC-102), then another organization's pending invitation or a login with a membership, checked together, both invitation.login_exists. Resending never checks for a login.
  • Source: D98 (proposed: zuki, in the session on #454); D101 (a removed member comes back by a new invitation to their login); D104 (zuki in the session on #650: only a login with no membership in any organization).
Section titled “R-ACC-93 · Sending an invitation to an email with no login makes the invited login and its profile, but gives it no membership or role until the link is opened”
  • Status: built
  • Example: given a super_admin invites deka@example.test, which has no login, as checker at PML, when the invitation is sent, then a login and a profile (R-ACC-13) exist for that email, an email with the link reaches it, and Deka holds no membership and reads nothing (R-ACC-07) until they open the link.
  • Refusal: none.
  • Who: every invitation to an email with no login; one to an existing login is R-ACC-265. Supabase Auth's admin invite makes the login and sends the email from apps/web's one server-only module; invite_member() has already checked and recorded the invitation. pgTAP proves that invite_member() makes no membership or role; a Playwright journey in apps/web/e2e/invitations.spec.ts proves the login and the email, as Auth's admin invite runs in apps/web: the email reaches the local mail catcher, and its link signs the invitee in.
  • Source: D98 (proposed); D50; D13 (the secret key, server side only).
Section titled “R-ACC-94 · An invite link lasts 24 hours; an expired link gives no membership”
  • Status: planned
  • Example: given Deka was invited at 09:00 on Monday, when they open the link at 09:01 on Tuesday, then it is refused, no membership is made, and the invitation stays pending until it is resent (R-ACC-95); opened at 08:59 on Tuesday, it works.
  • Refusal: none: Supabase Auth refuses the link with its otp_expired code, from otp_expiry of 86400 seconds in config.toml (checked by tools/db/check-auth-config.mjs) and in each hosted project. An expired invitation is not a status of its own: it is pending with its expiry passed.
  • Who: every invite link, and the sign-in link of R-ACC-265. A password-reset link lasts 24 hours too, as the setting is shared. Acceptance on Auth's confirmation doesn't recheck the invitation's own expiry: Auth's otp_expired is the gate. accept_invitation() does recheck it (R-ACC-268), since an existing login may accept from any session. No test can wait 24 hours, so this stays planned, checked by tools/db/check-auth-config.mjs; what the page shows is R-ACC-104.
  • Source: D98 (proposed: zuki, 24 hours); D51.
Section titled “R-ACC-95 · A pending invitation can be resent by a holder of user:write at its pool, which sends a fresh link and moves its expiry to 24 hours after the resend”
  • Status: built
  • Example: given Deka's invitation to checker at PML was sent on Monday and expired unopened, when a super_admin at PML resends it on Wednesday at 10:00, then a new email reaches Deka and its link works until Thursday at 10:00; the invitation keeps its email, role, pool, flag and rental companies (R-ACC-161, R-ACC-182). An admin without user:write at PML can't resend it, and an accepted or voided invitation can't be resent.
  • Refusal: invitation.not_allowed (42501), with pool_id, without user:write at the pool; access.grant_not_held when the role holds a permission the one resending lacks there (R-ACC-91); invitation.not_found, with invitation_id, for an invitation they can't see; invitation.not_pending, with invitation_id and status, for an accepted or voided one; access.scope_limit_required when the invitation carries the flag and the one resending lacks it (R-ACC-161); access.rental_company_not_held when its stored rental companies aren't within the set of the one resending (R-ACC-182). An expired invitation is still pending, so it can be resent.
  • Who: holders of user:write at the invitation's pool, whoever sent it first. The one resending becomes the invitation's inviter, whose grants R-ACC-97 rechecks; the audit log keeps who sent it first. To an existing login, the fresh link is a sign-in link (R-ACC-266).
  • Source: D98 (proposed: zuki, resend is in); the lead in the session on #454 (the last sender is the inviter).
Section titled “R-ACC-96 · Opening a valid invite link makes the invitee an active member of the organization, holding the invitation's role at its pool, once”
  • Status: built
  • Example: given Deka's pending invitation to checker at PML in organization A, when they open the link within 24 hours, then they are an active member of A holding checker at PML and nothing else, linked to the invitation's rental companies if it names any (R-ACC-155), and the invitation is accepted; opening the link a second time makes no second membership or role (R-ACC-14, R-ACC-22).
  • Refusal: none.
  • Who: every invitee, by the database, when Auth confirms a new login's email, through app.accept_invitation_on_confirm(). An existing login's acceptance is planned: see R-ACC-277. The activity log shows the acceptance as one entry (D52, R-AUD-14).
  • Source: D98 (proposed); D50; R-ACC-57.
Section titled “R-ACC-97 · An invitation whose inviter can no longer grant its role at its pool is voided when the link is opened, and makes no membership”
  • Status: built
  • Example: given Rina last sent Deka's invitation as checker at PML, when Rina loses user:write at PML, or a permission checker holds there, before Deka opens the link, then opening it voids the invitation, makes no membership or role, and Deka's login stays with no access: after setting a password they land on /no-access (R-APP-04).
  • Refusal: none: the invitation's status becomes voided, with the reason grant_not_held. Inside Auth's confirmation of the email the check never raises. For accept_invitation(), see R-ACC-269. An inviter whose rental companies no longer cover the invitation's voids it with the reason scope_not_held (R-ACC-162, R-ACC-183).
  • Who: every invitation, checked at acceptance by R-ACC-17 and R-ACC-50 as they stand then for whoever last sent it (R-ACC-95). A voided invitee keeps a login with no membership, so the voided invitation can't be resent (R-ACC-95); for a new invitation to them, see R-ACC-92 and R-ACC-265. Pulihkan on the voided invitation sends them a fresh link, and accepting it brings them in too (R-ACC-286, R-ACC-220, #599). An inviter who is suspended or removed holds nothing, so their invitations are voided too (R-ACC-203).
  • Source: D98 (proposed: zuki, recheck at acceptance).

R-ACC-98 · Accepting an invitation ends no sessions

Section titled “R-ACC-98 · Accepting an invitation ends no sessions”
  • Status: built
  • Example: given Deka opens their invite link and is signed in, when the database gives them checker at PML (R-ACC-96), then their session goes on and their profile's time of last access change stays empty; a later change to their roles ends their sessions as R-ACC-08 says.
  • Refusal: none.
  • Who: every invitee, at acceptance only, through Auth's confirmation; for accept_invitation(), see R-ACC-277. Like R-ACC-55, the grant only adds access to a login that had none, so nothing it holds is stale.
  • Source: D98 (proposed); D37, D48.

R-ACC-99 · Reading invitations needs user:read at the invitation's pool

Section titled “R-ACC-99 · Reading invitations needs user:read at the invitation's pool”
  • Status: built
  • Example: given a super_admin at PML and an admin without user:read, when each reads invitations, then the super_admin sees PML's and the admin sees none; a super_admin at SBY only doesn't see PML's.
  • Refusal: none: hidden.
  • Who: super_admin holds user:read. Sending and resending are R-ACC-57 and R-ACC-95; an invitation's rental companies are read the same way (R-ACC-164).
  • Source: D98 (proposed); R-ACC-16 (reading other members' access needs user:read).
Section titled “R-ACC-100 · The invite link opens /welcome, where the invitee sets their first password, under R-ACC-60 and R-ACC-70”
  • Status: built
  • Example: given Deka opens a valid invite link, when /welcome asks for a password and they enter "Abcdefg1", then it is saved; "abcdefg1" or "Abcdefghijklmn12" is refused with the form's message and they stay on the page.
  • Refusal: none: Supabase Auth's weak_password code, or apps/web's form for more than 15 characters (R-ACC-60).
  • Who: every invitee. Proved by a Playwright journey in apps/web/e2e/invitations.spec.ts against the local mail catcher, not pgTAP.
  • Source: D50, D51, D98 (proposed).

R-ACC-101 · After setting their first password, the invitee is signed in and lands on their role's page

Section titled “R-ACC-101 · After setting their first password, the invitee is signed in and lands on their role's page”
  • Status: built
  • Example: given Deka was invited as checker at PML and set their password, when the page saves it, then they are signed in and land on /dashboard (R-APP-04); invited as satpam, they land on /gate.
  • Refusal: none.
  • Who: every invitee whose invitation was accepted (R-ACC-96). Proved by a Playwright journey in apps/web/e2e/invitations.spec.ts. One whose invitation was voided lands on /no-access by R-ACC-97 and R-APP-04, which this rule's journey doesn't prove.
  • Source: D98 (proposed: zuki, the normal home); R-APP-04.

R-ACC-102 · An email with a pending invitation can't be invited again; the invitation is resent instead

Section titled “R-ACC-102 · An email with a pending invitation can't be invited again; the invitation is resent instead”
  • Status: built
  • Example: given deka@example.test has a pending invitation to checker at PML, when a super_admin invites that email again, to the same role or another, then it is refused and no second invitation or email is made; resending the first one (R-ACC-95) sends a fresh link. Given deka@example.test has a pending invitation from organization B, when a super_admin of organization A invites that email, then it is refused with R-ACC-92's key, though the login holds no membership yet, and the refusal doesn't name B's invitation. This is intended: under D104 a login belongs to one organization, so a login already promised to B by a pending invitation is kept out of A.
  • Refusal: invitation.already_pending, with the invitation_id of the pending one, when it is this organization's; invitation.login_exists, with the email only, when it is another organization's: that invitation's id is never shown.
  • Who: every inviter.
  • Source: D98 (proposed: one role at one pool, resend is in); BE's design in the session on #454; D104 and the lead in the session on #650 (another organization's pending invitation still refuses).

R-ACC-103 · An invitation to an address that isn't a valid email is refused

Section titled “R-ACC-103 · An invitation to an address that isn't a valid email is refused”
  • Status: built
  • Example: given a super_admin at PML, when they invite "deka@" or "deka example.test", then it is refused and no invitation or email is made; "deka@example.test" goes through.
  • Refusal: invitation.email_invalid, with the email.
  • Who: every inviter.
  • Source: BE's design in the session on #454; D10 (every refusal raises a stable key).
Section titled “R-ACC-104 · An invite link that has expired or was already used opens a page that says so, tells the invitee to ask their admin for a new invitation, and links to /login”
  • Status: built
  • Example: given Deka opened their invite link and set a password, when they open the same link again, then the page says the link has expired or was already used, asks them to ask their admin for a new invitation, and links to /login; no membership or password changes. A link opened after 24 hours shows the same page.
  • Refusal: none: Supabase Auth's otp_expired, which it returns for an expired link and for a used one alike.
  • Who: every invitee. Proved by a Playwright journey in apps/web/e2e/invitations.spec.ts that opens a link twice, since no journey can wait 24 hours (R-ACC-94).
  • Source: D98 (proposed); fe's review in the session on #454.

R-ACC-105 · When the invite email can't be sent, the invitation stays pending and the inviter is told at once, so they can resend it

Section titled “R-ACC-105 · When the invite email can't be sent, the invitation stays pending and the inviter is told at once, so they can resend it”
  • Status: built
  • Example: given invite_member() has recorded Deka's invitation to checker at PML, when Supabase Auth's admin invite fails (its mail server is down, or a rate limit is hit), then the invitation stays pending, the invite dialog says the email wasn't sent and offers Kirim ulang, and resending it (R-ACC-95) sends a fresh link.
  • Refusal: none: Auth's error reaches apps/web's server-only module, which reports it to the dialog; the invitation is not rolled back.
  • Who: every inviter. Proved by a Playwright journey in apps/web/e2e/invitations.spec.ts: the local stack can't make a send fail, so the journey sets a fault cookie that only a server started with E2E_FAULTS=1 reads, and apps/web's server-only module then fails the send.
  • Source: D98 (proposed: sending from the app server lets a failed send reach the inviter at once); the lead in the session on #454.
Section titled “R-ACC-106 · An invitee who opened their link but hasn't set a password is sent to /welcome from every other page”
  • Status: built
  • Example: given Deka opened their invite link and left /welcome without saving a password, when they open /dashboard or /no-access, then they land on /welcome; once the password is saved (R-ACC-100), they reach their pages (R-ACC-101). An invitee whose invitation was voided (R-ACC-97) is sent to /welcome too, and lands on /no-access after saving it. A login moved from v1 is never sent there.
  • Refusal: none: proxy.ts redirects to /welcome.
  • Who: every signed-in login whose Auth user_metadata has invited, set when the invitation is sent, and not password_set, set when the password is saved. A login moved from v1 never carries invited (R-ACC-58). Every page under proxy.ts except /welcome and sign-out. Proved by a Playwright journey in apps/web/e2e/invitations.spec.ts.
  • Source: D98 (proposed); D50; the lead in the session on #454.

R-ACC-245 · /welcome saves a password only for an invitee who hasn't set one

Section titled “R-ACC-245 · /welcome saves a password only for an invitee who hasn't set one”
  • Status: built
  • Example: given Deka opened their invite link and hasn't set a password, when /welcome saves "Abcdefg1", then it goes through (R-ACC-100). Given Deka then clears password_set in their own Auth metadata, which any session can, when they open /welcome, which the proxy now allows, and save "Abcdefg2", then it is refused, the page says so, and "Abcdefg1" still signs them in. Rina, whose login was moved from v1 with its password (R-ACC-58), is refused the same way.
  • Refusal: checked in this order by assert_first_password(), which apps/web calls before it asks Supabase Auth to set the password: profile.not_signed_in (42501) when no one is signed in; auth.password_already_set (P0001), with no detail, when the login already has a password, read from auth.users, not from the claims: the random password Auth gives an invited login when its link is opened doesn't count; one the login sets after that does, and so does the password a moved login keeps, even one invited in v1. A login exists only by invitation or by the v1 move (D50), and a moved login always has a password, so this one check also refuses a login that was never invited.
  • Who: every signed-in login that reaches /welcome's save. An invitee whose invitation was voided sets their first password too, as R-ACC-97 and R-ACC-106 already say. The proxy's redirect to /welcome stays on the login's claims (R-ACC-106); this check is in Postgres (D3), so a session that skips the page is refused too. Proved by pgTAP and by a Playwright journey in apps/web/e2e/invitations.spec.ts.
  • Source: zuki in the session on #637 (a Postgres check), from #603 (the action set a password for any signed-in session); D51; D10.
Section titled “R-ACC-265 · Inviting an email whose login exists sends a sign-in link that lasts 24 hours, in place of Auth's invite, and makes no second login”
  • Status: built
  • Example: given Rina's login has no membership in any organization (R-ACC-92), when a super_admin of A invites rina@example.test as checker at PML, then the invitation is pending with an expiry 24 hours on, an email with a sign-in link reaches Rina, no new login or profile is made, and Rina's password stays as it was. Opening the link signs Rina in, and acceptance runs through accept_invitation() (R-ACC-277).
  • Refusal: none: invite_member()'s refusals are R-ACC-57 to R-ACC-103. A failed send is R-ACC-105, as for any invitation.
  • Who: every invitation to an existing login. Postgres decides the delivery: invite_member() returns delivery 'sign_in' for a confirmed login and 'invite' otherwise (R-ACC-287). apps/web's one server-only module only follows it, asking Supabase Auth for the sign-in link because Auth won't invite a login that exists; it makes no choice (D3). The link's lifetime is R-ACC-94's setting. The invite dialog and the Undangan row look the same as for any invitation. Proved by a Playwright journey against the local mail catcher, not pgTAP.
  • Source: D101 (a sign-in link instead of Auth's invite, 24 hours); D98; D104.
Section titled “R-ACC-266 · Resending an invitation to an existing login sends a fresh sign-in link and moves its expiry to 24 hours after the resend”
  • Status: built
  • Example: given Rina's re-invitation (R-ACC-265) was sent on Monday and expired unopened, when a super_admin at PML resends it on Wednesday at 10:00, then a new sign-in link reaches Rina, the invitation's expiry is Thursday at 10:00, and it keeps its email, role, pool, flag and rental companies.
  • Refusal: R-ACC-95's, in its order.
  • Who: holders of user:write at the invitation's pool, as R-ACC-95 says. Postgres decides the delivery: resend_invitation() returns delivery 'sign_in' for a confirmed login (R-ACC-287), and apps/web's server-only module only follows it (D3). Proved by a Playwright journey against the local mail catcher.
  • Source: D101; D98 (resend is in); the lead in the session on #650.

R-ACC-267 · accept_invitation() makes the signed-in login a member holding its email's pending invitation's role at its pool

Section titled “R-ACC-267 · accept_invitation() makes the signed-in login a member holding its email's pending invitation's role at its pool”
  • Status: retired (a password sign-in accepts too, from /no-access, R-ACC-279; restated as R-ACC-277; zuki 2026-11-19, #689)
  • Example: given Rina, removed from A, has a pending invitation to checker at PML in A sent to their login's email, when Rina opens the sign-in link before its expiry and apps/web calls accept_invitation() for them, then they are an active member of A holding checker at PML, with the invitation's flag or rental companies (R-ACC-155), the invitation is accepted, and no session ends (R-ACC-98). Calling it again finds none pending and is refused (R-ACC-270). Acceptance happens when the link is opened (D101): signing in with a password accepts nothing, and the member lands on /no-access while the invitation stays pending.
  • Refusal: checked in this order: profile.not_signed_in (42501) when no one is signed in; invitation.not_found when the email has no pending invitation (R-ACC-270); invitation.expired when its expiry has passed (R-ACC-268). A failed recheck voids the invitation and doesn't raise (R-ACC-269).
  • Who: every signed-in login, for the invitations sent to its own email, compared without regard to case. It takes no arguments. An email has at most one pending invitation across all organizations (the unique index invitations_one_pending, R-ACC-102), so the call accepts one invitation and returns one row, which carries void_reason (R-ACC-269). It and app.accept_invitation_on_confirm(), which serves a new login on Auth's confirmation, call one shared check, so R-ACC-96, R-ACC-97, R-ACC-155, R-ACC-162, R-ACC-183 and R-ACC-244 hold for both. The activity log shows the acceptance as one entry, as R-ACC-96.
  • Source: D101 (a new accept_invitation() rechecks as D98 does); the lead in the session on #650 (beside the trigger, no arguments, by the caller's email).

R-ACC-268 · accept_invitation() refuses an invitation whose expiry has passed, and it stays pending

Section titled “R-ACC-268 · accept_invitation() refuses an invitation whose expiry has passed, and it stays pending”
  • Status: built
  • Example: given Rina's re-invitation was sent on Monday at 09:00, when accept_invitation() is called for Rina, signed in, on Tuesday at 09:01, then it is refused, no membership is made, and the invitation stays pending until it is resent (R-ACC-266); called on Tuesday at 08:59, it goes through.
  • Refusal: invitation.expired, with invitation_id and expires_at.
  • Who: every caller of accept_invitation(). Any session of the invited login may accept before the expiry, since the login keeps its password and the link isn't the only way in; no check of how the session signed in is made. Acceptance on Auth's confirmation has Auth's otp_expired as its gate instead (R-ACC-94).
  • Source: zuki in the session on #650 (any session before expires_at; past it, invitation.expired); D98 (24 hours); D10.

R-ACC-269 · accept_invitation() voids an invitation whose recheck fails, keeps it voided, and returns the reason as a key

Section titled “R-ACC-269 · accept_invitation() voids an invitation whose recheck fails, keeps it voided, and returns the reason as a key”
  • Status: built
  • Example: given Rina last sent Eko's re-invitation as checker at PML, when Rina loses user:write at PML before Eko calls accept_invitation(), then the invitation is voided with the reason grant_not_held, Eko gets no membership, and the call returns that reason's key rather than raising, so the void isn't rolled back. An inviter whose rental companies no longer cover the invitation voids it with scope_not_held (R-ACC-162, R-ACC-183).
  • Refusal: none raised: the result carries the void reason as a D10 key in its void_reason column, invitation.grant_not_held or invitation.scope_not_held. apps/web shows it as R-ACC-272 says.
  • Who: every caller of accept_invitation(); the recheck is R-ACC-97's, through the shared check of R-ACC-277. One exception: a caller who is a member of another organization is refused with invitation.login_exists, raised, and the invitation stays pending, not voided (R-ACC-276).
  • Source: D101, D98 (recheck at acceptance); the lead in the session on #650 (the void stays, the reason comes back as a key).

R-ACC-270 · accept_invitation() is refused when the caller's email has no pending invitation

Section titled “R-ACC-270 · accept_invitation() is refused when the caller's email has no pending invitation”
  • Status: built
  • Example: given Rina accepted their re-invitation, or it was revoked (R-ACC-207), or none was ever sent to their email, when Rina calls accept_invitation(), then it is refused and nothing changes. An invitation to another email is never accepted for them.
  • Refusal: invitation.not_found, with no detail: there is no invitation to name.
  • Who: every caller of accept_invitation().
  • Source: the lead in the session on #650 (no pending invitation raises invitation.not_found); D10.
Section titled “R-ACC-271 · A re-invited member with a password who opens the sign-in link lands on their landing page, never /welcome”
  • Status: built
  • Example: given Rina, removed from A, set a password before, and their re-invitation as checker at PML is pending, when they open the sign-in link, then their invitation is accepted (R-ACC-277) and they land on /dashboard (R-APP-04); invited as satpam, on /gate. They are never sent to /welcome and their password still signs them in.
  • Refusal: none.
  • Who: every existing login with a password. A login that never set one, such as an invitee voided before saving it (R-ACC-97), still goes to /welcome first (R-ACC-106). Proved by a Playwright journey in apps/web/e2e/invitations.spec.ts.
  • Source: D101 (the login keeps its password, so no /welcome); the lead in the session on #650 (R-APP-04's landing page).
Section titled “R-ACC-272 · A refused acceptance from a sign-in link signs the user out and opens /auth/invalid, which says why in the user's language”
  • Status: built
  • Example: given a super_admin chose Batalkan on Rina's pending re-invitation (R-ACC-207), when Rina opens the sign-in link already sent, then accept_invitation() raises invitation.not_found (R-ACC-270), Rina is signed out and /auth/invalid shows the mapped text for that key; no membership is made. invitation.expired, which accept_invitation() raises (R-ACC-268), and the two void reasons, which it returns in void_reason and doesn't raise (R-ACC-269), show their mapped texts the same way. An expired link never gets this far: Auth refuses it first and R-ACC-104's page shows.
  • Refusal: none: apps/web maps the key (D10); an unknown key shows the generic message.
  • Who: every existing login that opens a sign-in link. The copy is fe's. The revoked case is proved by a Playwright journey in apps/web/e2e/invitations.spec.ts; the other keys' texts by the mapping's unit tests.
  • Source: the lead in the session on #650 (signed out, /auth/invalid with the mapped text).
Section titled “R-ACC-273 · The sign-in link's email is in Indonesian and reads as an invitation to the organization”
  • Status: built
  • Example: given a super_admin of A re-invites Rina (R-ACC-265), when the email reaches them, then it is in Indonesian, says they are invited to join Opleet, and carries the sign-in link with its 24 hours; it doesn't read as a sign-in request they made.
  • Refusal: none.
  • Who: every re-invited login. It is Auth's magic_link template: config.toml for the local stack, and a step zuki runs on each hosted project (be's). The wording is be's and fe's. Proved by a Playwright journey that reads the email in the local mail catcher.
  • Source: the lead in the session on #650 (a new Indonesian magic_link template worded as an invitation); D51.

R-ACC-274 · invite_member() and resend_invitation() return the delivery, sign_in for a confirmed login and invite otherwise

Section titled “R-ACC-274 · invite_member() and resend_invitation() return the delivery, sign_in for a confirmed login and invite otherwise”
  • Status: retired (restore_invitation() returns the delivery too; restated as R-ACC-287; zuki 2026-11-20, #695)
  • Example: given Rina's confirmed login holds no membership in any organization, when a super_admin invites rina@example.test, then invite_member() returns a public.sent_invitation, every invitations column plus delivery, with delivery 'sign_in'; inviting deka@example.test, who has no login, or whose login was never confirmed, returns delivery 'invite'. resend_invitation() returns the delivery the same way, by the login as it stands at the resend.
  • Refusal: none: each function's refusals are its own rules (R-ACC-57 to R-ACC-103, R-ACC-95).
  • Who: every caller of invite_member() and resend_invitation(). apps/web sends Auth's invite for 'invite' and the sign-in link for 'sign_in' (R-ACC-265, R-ACC-266), and makes no choice of its own (D3). restore_invitation() is unchanged (R-ACC-212).
  • Source: D101, D3; the lead in the session on #650 (delivery is decided in Postgres; Interface B1 to B6 in the backend's M1 runbook).

R-ACC-287 · invite_member(), resend_invitation() and restore_invitation() return the delivery, sign_in for a confirmed login and invite otherwise

Section titled “R-ACC-287 · invite_member(), resend_invitation() and restore_invitation() return the delivery, sign_in for a confirmed login and invite otherwise”
  • Status: built
  • Example: given Rina's confirmed login holds no membership in any organization, when a super_admin invites rina@example.test, then invite_member() returns a public.sent_invitation, every invitations column plus delivery, with delivery 'sign_in'; inviting deka@example.test, who has no login, or whose login was never confirmed, returns delivery 'invite'. resend_invitation() and restore_invitation() return a public.sent_invitation the same way, with the delivery by the login as it stands at the call: restoring Rina's voided invitation returns 'sign_in' (R-ACC-286), and restoring Deka's returns 'invite' (R-ACC-220).
  • Refusal: none: each function's refusals are its own rules (R-ACC-57 to R-ACC-103, R-ACC-95, R-ACC-286).
  • Who: every caller of the three functions. apps/web sends Auth's invite for 'invite' and the sign-in link for 'sign_in' (R-ACC-265, R-ACC-266, R-ACC-286), and makes no choice of its own (D3).
  • Source: D101, D3; the lead in the session on #650 (delivery is decided in Postgres; Interface B1 to B6 in the backend's M1 runbook); the lead in the session on #694 (restore returns it too; restates R-ACC-274).

R-ACC-276 · accept_invitation() is refused when the caller's login is a member of another organization, and the invitation stays pending

Section titled “R-ACC-276 · accept_invitation() is refused when the caller's login is a member of another organization, and the invitation stays pending”
  • Status: built
  • Example: given Rina has a pending invitation to checker at PML in organization A, and Rina's login has since become a member of organization B, when accept_invitation() is called for Rina, then it is refused with invitation.login_exists, Rina gets no membership of A, and the invitation stays pending, not voided. When the same case reaches app.accept_invitation_on_confirm() on Auth's confirmation, the trigger catches the key, the confirmation goes through, and the invitation stays pending the same way.
  • Refusal: invitation.login_exists, with the email only, as R-ACC-92. It is raised by the shared check, app.settle_invitation(), so it is an exception to R-ACC-269, which voids and doesn't raise.
  • Who: every caller of accept_invitation(), and Auth's confirmation through the trigger. A login is a member of one organization (D104); restoring refuses the same case (R-ACC-275).
  • Source: D104, R-ACC-92; zuki, 2026-11-19, in the session on #693 (#690: app.settle_invitation() raises it, so the invitation stays pending).

R-ACC-277 · accept_invitation() makes the signed-in login a member holding its email's pending invitation's role at its pool

Section titled “R-ACC-277 · accept_invitation() makes the signed-in login a member holding its email's pending invitation's role at its pool”
  • Status: built
  • Example: given Rina, removed from A, has a pending invitation to checker at PML in A sent to their login's email, when apps/web calls accept_invitation() for Rina before its expiry, from the sign-in link (R-ACC-271) or from /no-access after a password sign-in (R-ACC-279), then they are an active member of A holding checker at PML, with the invitation's flag or rental companies (R-ACC-155), the invitation is accepted, and no session ends (R-ACC-98). Calling it again finds none pending and is refused (R-ACC-270).
  • Refusal: checked in this order: profile.not_signed_in (42501) when no one is signed in; invitation.not_found when the email has no pending invitation (R-ACC-270) or the login's email isn't confirmed (R-ACC-278); invitation.expired when its expiry has passed (R-ACC-268); invitation.login_exists when the login is a member of another organization (R-ACC-276), before the recheck, so nothing is voided. A failed recheck then voids the invitation and doesn't raise (R-ACC-269).
  • Who: every signed-in login, for the invitations sent to its own email, compared without regard to case. It takes no arguments. An email has at most one pending invitation across all organizations (the unique index invitations_one_pending, R-ACC-102), so the call accepts one invitation and returns one row, which carries void_reason (R-ACC-269). It and app.accept_invitation_on_confirm(), which serves a new login on Auth's confirmation, call one shared check, app.settle_invitation(), so R-ACC-96, R-ACC-97, R-ACC-155, R-ACC-162, R-ACC-183, R-ACC-244 and R-ACC-276 hold for both. The activity log shows the acceptance as one entry, as R-ACC-96.
  • Source: D101 (a new accept_invitation() rechecks as D98 does); the lead in the session on #650 (beside the trigger, no arguments, by the caller's email); zuki, 2026-11-19, in the session on #693 (#689: a password sign-in accepts too; restates R-ACC-267).

R-ACC-278 · accept_invitation() finds no pending invitation for a login whose email isn't confirmed

Section titled “R-ACC-278 · accept_invitation() finds no pending invitation for a login whose email isn't confirmed”
  • Status: built
  • Example: given Deka's login was made by an invite that Deka never opened, so its email_confirmed_at is null, and Deka's invitation is pending, when accept_invitation() is called in a session of Deka's login, then it is refused with invitation.not_found and the invitation stays pending; once Deka opens the invite, the confirmation accepts it (R-ACC-96).
  • Refusal: invitation.not_found, with no detail, as R-ACC-270.
  • Who: every caller of accept_invitation(). A login proves its email by confirming it, so only a confirmed login accepts through this call; an unconfirmed one accepts on Auth's confirmation.
  • Source: zuki, 2026-11-19, in the session on #693 (#690: accept_invitation() requires email_confirmed_at).

R-ACC-279 · /no-access calls accept_invitation() once per page load for a signed-in login that holds no permission, and an accepted invitation sends the user to their landing page

Section titled “R-ACC-279 · /no-access calls accept_invitation() once per page load for a signed-in login that holds no permission, and an accepted invitation sends the user to their landing page”
  • Status: built
  • Example: given Rina, removed from A, has a pending re-invitation to checker at PML, when Rina signs in with their password instead of opening the sign-in link, then they land on /no-access (R-APP-04), which calls accept_invitation() for them once; it accepts the invitation (R-ACC-277) and Rina is sent on to /dashboard (R-APP-04); invited as satpam, to /gate. Reloading /no-access with no pending invitation calls it once more and shows the plain page.
  • Refusal: none: accept_invitation()'s keys show as R-ACC-280 says.
  • Who: every signed-in login for which my_permissions() returns no rows; Postgres decides the outcome, not the page (D3). A suspended member (R-ACC-206) or a member whose pools are all retired (R-APP-31) can't hold a pending invitation (D104, R-ACC-92), so their call finds none and they see the plain page (R-ACC-280). Where the server call is made is fe's choice.
  • Source: zuki, 2026-11-19, in the session on #693 (#689: /no-access accepts, once per page load); the lead there (every login with no permission, D3); D101.

R-ACC-280 · When /no-access's acceptance is voided, or refused as expired or for a login that is a member elsewhere, the page says why in the user's language, and the user stays signed in

Section titled “R-ACC-280 · When /no-access's acceptance is voided, or refused as expired or for a login that is a member elsewhere, the page says why in the user's language, and the user stays signed in”
  • Status: built
  • Example: given Rina's re-invitation was sent by a super_admin who has since lost user:write at PML, when Rina signs in with their password and lands on /no-access, then accept_invitation() voids it (R-ACC-269) and the page shows the mapped text of invitation.grant_not_held, as R-ACC-272 does, with Rina still signed in. Given Rina's invitation has expired, the page shows invitation.expired's text, which asks the admin to resend it (R-ACC-266). Given Rina holds an older pending invitation while a member of another organization, the page shows invitation.login_exists's text (R-ACC-276). Given Rina has no pending invitation (invitation.not_found), the page is the plain /no-access, with no extra text.
  • Refusal: none: apps/web maps the key (D10); an unknown key shows the generic message.
  • Who: every login that R-ACC-279 serves. Unlike a refused sign-in link (R-ACC-272), the user isn't signed out. The copy is fe's. A Playwright journey proves the plain page for not_found; the expired, voided and login_exists cases are proved by pgTAP (R-ACC-268, R-ACC-269, R-ACC-276) and the mapping's unit tests, since a journey can't move the clock past an expiry or take a grant from a shared E2E inviter.
  • Source: zuki, 2026-11-19, in the session on #693 (#689: voided shows the reason as R-ACC-272, expired asks for a resend, not_found is today's page).

R-ACC-154 · For an inviter without the flag, invite_member() records with the invitation the list of rental companies it is given

Section titled “R-ACC-154 · For an inviter without the flag, invite_member() records with the invitation the list of rental companies it is given”
  • Status: built
  • Example: given Deka holds user:write at PML and is limited to partners A and B, when Deka invites rina@example.test as checker at PML with A, then the pending invitation names Rina's email, checker, PML and A, without the flag; with A and B it names both; with an empty list it names none, and Rina will join seeing no cars (R-ACC-155). An inviter with the flag records the flag instead (R-ACC-181). Called with null instead of a set, it is refused and no invitation is made.
  • Refusal: access.rental_companies_required, with pool_id, for a null set passed explicitly; left out, the set is empty. The set's other refusals each have their own rule, checked after R-ACC-91's and before R-ACC-103's, in this order: a null set, R-ACC-156, R-ACC-160, R-ACC-157, R-ACC-158, then R-ACC-159.
  • Who: every inviter, through invite_member(). The flag is kept in invitations.all_rental_companies, and a list in invitation_rental_companies, one row per company, in the invitation's organization. An inviter lacks the flag when their active membership in the invitation's organization lacks it; their own set is their member_rental_companies rows through it, inactive companies included, as R-ACC-149 says. An inviter without the flag needs user:write at the invitation's pool only (R-ACC-57), not at every active pool as set_company_scope() does (R-ACC-136).
  • Source: zuki on #616, 2026-11-12 (a scoped inviter picks from their own companies; the invitation stores it); the lead in the session on #616 (the table, the keys, user:write at the invitation's pool only); D99 (an unscoped inviter's invitation gives the flag); D100 (an empty list narrows, so a scoped inviter may send one); be in the session on #621 (the column).

R-ACC-181 · An invitation from an inviter with the flag carries the flag

Section titled “R-ACC-181 · An invitation from an inviter with the flag carries the flag”
  • Status: built
  • Example: given a super_admin with the flag at PML's organization, when they invite rina@example.test as checker at PML with an empty set, or with the set left out, then the pending invitation carries the flag and names no rental company, and Rina will join with the flag (R-ACC-155). With a set that isn't empty it is refused (R-ACC-160).
  • Refusal: none. The set's refusals are R-ACC-154's.
  • Who: every inviter whose active membership in the invitation's organization has the flag, through invite_member(). The flag is kept in invitations.all_rental_companies (R-ACC-154).
  • Source: D99 (an unscoped inviter's invitation gives the flag); be in the session on #621 (the column). Split from R-ACC-154.

R-ACC-243 · An invitation never carries the flag and a rental company at once

Section titled “R-ACC-243 · An invitation never carries the flag and a rental company at once”
  • Status: built
  • Example: given Rina's pending invitation carries the flag, when any writer adds an invitation_rental_companies row for it, then it is refused and nothing changes. Given Rina's invitation names partner A, when any writer sets its all_rental_companies to true without removing A, then it is refused the same way.
  • Refusal: access.rental_companies_with_flag (P0001), with invitation_id, raised by a trigger, as R-ACC-172 for memberships.
  • Who: every writer of invitations and invitation_rental_companies, the operator included. invite_member() already never makes such an invitation (R-ACC-160, R-ACC-156); this rule holds when something other than invite_member() writes.
  • Source: D99 (either the flag or a list); #625 (only invite_member() prevented it); the lead in the session on #637 (reuse R-ACC-172's key).
Section titled “R-ACC-155 · Accepting an invitation gives the new member the invitation's flag, or links them to its list of rental companies”
  • Status: built
  • Example: given Deka's invitation to Rina as checker at PML names partner A, when Rina opens the link (R-ACC-96), then Rina is an active member holding checker at PML, without the flag and limited to A, and sees A's cars only (R-ACC-43). An invitation with the flag makes a member with the flag (R-ACC-42); one with an empty list makes a member who sees no cars (R-ACC-169). A stored company that has become inactive since the invitation was sent is still linked, as the link only narrows what Rina sees.
  • Refusal: none. R-ACC-162 may void the invitation instead.
  • Who: every invitee, by the database, when Auth confirms the invited login's email. The flag and the links are set in the same transaction as the membership and the role, so the activity log shows the acceptance as one entry (D52, R-ACC-96), and they end no sessions (R-ACC-98, R-ACC-140).
  • Source: zuki on #616, 2026-11-12 (acceptance links them); the lead in the session on #616 (an inactive stored company is still linked); D99 (an unscoped inviter's invitation gives the flag).

R-ACC-244 · Accepting an invitation onto a membership the login already holds keeps the flag only when both the membership and the invitation have it

Section titled “R-ACC-244 · Accepting an invitation onto a membership the login already holds keeps the flag only when both the membership and the invitation have it”
  • Status: built
  • Example: given Deka is already a member of organization A with the flag, when an invitation to A that names partner B is accepted for Deka's login, then Deka's membership loses the flag and is limited to B. Given Deka is limited to partner A, when an invitation with the flag is accepted, then Deka keeps their list and gains nothing. Given both have the flag, Deka keeps it. Given Deka has the flag and the invitation has an empty list, Deka ends with no flag and no company, and sees no cars (R-ACC-169). A list on the membership keeps its companies and gains the invitation's.
  • Refusal: none.
  • Who: every acceptance that finds a membership of the login in the invitation's organization, at the database. invite_member() refuses an email whose login holds a membership in any organization (R-ACC-92), so no app path reaches it today; pgTAP proves it by accepting onto a membership it makes first. The new flag never widens what the member sees.
  • Source: zuki in the session on #637 (today's flag of the membership AND the flag of the invitation), from #625; D99.

R-ACC-156 · An invitation from an inviter without the flag never carries the flag

Section titled “R-ACC-156 · An invitation from an inviter without the flag never carries the flag”
  • Status: built
  • Example: given Deka holds user:write at PML and is limited to partner A, when Deka invites rina@example.test as checker at PML with an empty list, then the invitation goes through without the flag, and Rina will join seeing no cars (R-ACC-155, R-ACC-169); with A it names A. Only an inviter with the flag makes an invitation that carries it (R-ACC-181).
  • Refusal: none: invite_member() takes no argument for the flag (R-ACC-154), so there is nothing to refuse.
  • Who: every inviter without the flag in the invitation's organization (R-ACC-154).
  • Source: zuki on #616, 2026-11-12; D99 (a scoped caller can never give the flag); D100 (an empty list narrows); the lead in the session on #621 (the key moves to the flag). It refused an empty set from such an inviter.

R-ACC-157 · invite_member() is refused when a rental company in the set isn't of the invitation's organization

Section titled “R-ACC-157 · invite_member() is refused when a rental company in the set isn't of the invitation's organization”
  • Status: built
  • Example: given Deka is a member of organizations A and B, holds user:write at A's pool PML and is limited to A's partner P, when Deka invites rina@example.test to PML with B's partner Q, then it is refused and no invitation is made. An id that names no rental company gets the same refusal, so it says nothing of B's companies (R-ACC-102, R-ACC-116).
  • Refusal: access.rental_company_not_found, with the first such rental_company_id in the order given, as R-ACC-137. invitation_rental_companies carries the invitation's organization, with composite foreign keys as member_rental_companies has (R-TEN-05), so no writer can link across organizations.
  • Who: every inviter without the flag, an empty list included (R-ACC-154); an inviter with the flag who sends a set is refused first, by R-ACC-160.
  • Source: R-ACC-137; the lead in the session on #616 (the keys and the table); D99 (scoped means without the flag).

R-ACC-158 · invite_member() is refused when the inviter lacks the flag and the set names a company outside their own

Section titled “R-ACC-158 · invite_member() is refused when the inviter lacks the flag and the set names a company outside their own”
  • Status: built
  • Example: given Deka holds user:write at PML and is limited to partners A and B, when Deka invites rina@example.test as checker at PML with A and C, then it is refused and no invitation, login or email is made; with A, with A and B, or with an empty list, it goes through. Given Eko's own list is empty, any company Eko names is outside it.
  • Refusal: access.rental_company_not_held (42501), with organization_id and the rental_company_ids outside the inviter's set, in the order given, as R-ACC-149.
  • Who: every inviter without the flag in the invitation's organization, inactive companies counted as their own (R-ACC-154).
  • Source: zuki on #616, 2026-11-12 (a subset of their own companies); R-ACC-149; D99 (scoped means without the flag).

R-ACC-159 · invite_member() is refused when the set names an inactive rental company

Section titled “R-ACC-159 · invite_member() is refused when the set names an inactive rental company”
  • Status: built
  • Example: given Deka is limited to partners A and B, and B is inactive, when Deka invites rina@example.test to PML with B, then it is refused and no invitation is made; with A it goes through.
  • Refusal: access.rental_company_not_active, with the first inactive rental_company_id in the order given, as R-ACC-138.
  • Who: every inviter without the flag. A stored company that becomes inactive later is still linked at acceptance (R-ACC-155).
  • Source: R-ACC-138 (a new link to an inactive company is refused); the lead in the session on #616; D99 (scoped means without the flag).

R-ACC-160 · invite_member() is refused with a non-empty set when the inviter has the flag

Section titled “R-ACC-160 · invite_member() is refused with a non-empty set when the inviter has the flag”
  • Status: built
  • Example: given a super_admin with the flag, when they invite rina@example.test as checker at PML with partner A, then it is refused and no invitation is made; with an empty set it goes through, the invitation carries the flag, and Rina joins with the flag (R-ACC-155). Limiting Rina afterwards is set_company_scope() (R-ACC-135).
  • Refusal: invitation.rental_companies_not_allowed (P0001), with pool_id.
  • Who: every inviter with the flag in the invitation's organization. The invite dialog shows them no picker (R-ACC-163).
  • Source: zuki on #616, 2026-11-12 (an unscoped inviter has no picker, and a set from one is refused with a key); be in the session on #616 (the key and its place in the order); D99 (an unscoped inviter's invitation gives the flag).

R-ACC-161 · Resending an invitation that carries the flag is refused when the one resending lacks the flag

Section titled “R-ACC-161 · Resending an invitation that carries the flag is refused when the one resending lacks the flag”
  • Status: built
  • Example: given a super_admin with the flag invited Rina, so the invitation carries the flag, when Eko, who holds user:write at PML and is limited to B, resends it, then it is refused and nothing changes. Given Eko's own list is empty, the same. A super_admin with the flag may resend it, and Rina still joins with the flag (R-ACC-155). An invitation with an empty list never meets this rule.
  • Refusal: access.scope_limit_required (42501), with pool_id, as R-ACC-150. Checked after R-ACC-95's grants, then R-ACC-182, then R-ACC-95's status check.
  • Who: every caller of resend_invitation() without the flag in the invitation's organization; a caller with the flag passes this rule. A resend takes no set and never changes the stored flag or list; a different one needs a new invitation once this one is accepted or voided. The one resending becomes the inviter, whom R-ACC-162 and R-ACC-183 recheck.
  • Source: the lead in the session on #616 (the stored set is rechecked against the resender, as R-ACC-95 does for grants); D99 (a scoped caller can never give the flag). Split from R-ACC-161, which checked the flag and the companies together.

R-ACC-182 · Resending an invitation is refused when the one resending lacks the flag and the invitation names a rental company outside their own

Section titled “R-ACC-182 · Resending an invitation is refused when the one resending lacks the flag and the invitation names a rental company outside their own”
  • Status: built
  • Example: given Deka is limited to partners A and B and Rina's pending invitation names A, when Deka resends it, then it goes through and still names A (R-ACC-95). Given Eko holds user:write at PML and is limited to B, when Eko resends it, then it is refused and nothing changes; an invitation with an empty list goes through. A super_admin with the flag may resend it, and the invitation keeps what it names, so Rina is still limited to A when it is accepted (R-ACC-155).
  • Refusal: access.rental_company_not_held (42501), with organization_id and the stored rental_company_ids outside the caller's set, ordered by company name, as R-ACC-149. Checked after R-ACC-161 and before R-ACC-95's status check. The stored companies aren't checked again for their organization or for being active (R-ACC-157, R-ACC-159).
  • Who: every caller of resend_invitation() without the flag in the invitation's organization, inactive companies counted as their own (R-ACC-154).
  • Source: zuki on #616, 2026-11-12 (hands off what lies outside a scoped manager's companies); the lead in the session on #616 (the stored set is rechecked against the resender); D100 (an empty list is within every set). Split from R-ACC-161.
Section titled “R-ACC-162 · Opening the link voids an invitation, making no membership, when its inviter now lacks the flag and it names a company outside the inviter's own”
  • Status: built
  • Example: given Deka last sent Rina's invitation with partner A while limited to A and B, when Deka's set becomes B alone before Rina opens the link, then opening it voids the invitation, makes no membership, role or link, and Rina's login stays with no access, as R-ACC-97 says. An invitation with an empty list is never voided by this rule. Given Deka is given the flag instead, Rina joins limited to A (R-ACC-155).
  • Refusal: none: the invitation's status becomes voided, with the reason scope_not_held. The check runs inside Auth's confirmation of the email, so it never raises.
  • Who: every invitation that names a rental company, checked at acceptance against the flag and rental companies, at that moment, of whoever last sent it (R-ACC-95). R-ACC-97 is checked first. For a new invitation to a voided invitee, see R-ACC-92 and R-ACC-265.
  • Source: zuki on #616, 2026-11-12; the lead in the session on #616 (void at acceptance, as R-ACC-97; the new reason); D99, D100.
Section titled “R-ACC-183 · Opening the link voids an invitation that carries the flag, making no membership, when its inviter now lacks the flag”
  • Status: built
  • Example: given a super_admin with the flag sent Rina's invitation, which carries the flag, when that super_admin is limited to partner A before Rina opens the link, then opening it voids the invitation, makes no membership, role or link, and Rina's login stays with no access, as R-ACC-97 says. Given the inviter keeps the flag, Rina joins with the flag (R-ACC-155).
  • Refusal: none: the invitation's status becomes voided, with the reason scope_not_held, as R-ACC-162. It never raises.
  • Who: every invitation that carries the flag, checked at acceptance against whoever last sent it (R-ACC-95). R-ACC-97 is checked first. For a new invitation to a voided invitee, see R-ACC-92 and R-ACC-265.
  • Source: the lead in the session on #616 (void at acceptance, as R-ACC-97); D99 (a scoped caller can never give the flag). Split from R-ACC-162.

R-ACC-163 · For an inviter without the flag, the invite dialog offers their own active companies and offers no flag

Section titled “R-ACC-163 · For an inviter without the flag, the invite dialog offers their own active companies and offers no flag”
  • Status: built
  • Example: given Deka holds user:write at PML and is limited to partners A, B and C, of which C is inactive, when Deka opens the invite dialog and chooses PML, then A and B are offered unticked and C isn't, with no Semua perusahaan rental control. Ticking A and sending calls invite_member() with A (R-ACC-154). Sending with none ticked asks to confirm first (R-ACC-185). A super_admin with the flag sees no picker and sends an empty set, so the invitation carries the flag (R-ACC-181).
  • Refusal: none: a company not offered can't be ticked. A call made anyway is refused by R-ACC-158 or R-ACC-159.
  • Who: inviters, in the invite dialog on /users. The dialog reads it once when the page loads, from invitable_roles(): for each pool, company_scoped says whether the caller lacks the flag in its organization, and rental_companies lists their own active ones, each with rental_company_id and name, ordered by name, empty when company_scoped is false. The dialog doesn't read them from scope_companies() (R-ACC-143), since an inviter holds user:write at the pool but may lack user:read.
  • Source: zuki on #616, 2026-11-12 (a scoped inviter picks from their own companies; an unscoped inviter has no picker); fe and the lead in the session on #616 (one read when the page loads, per pool); D99; D100 (a scoped inviter may invite with an empty list). It sent nothing until a company was ticked.

R-ACC-185 · For an inviter without the flag, sending an invitation with no rental company ticked asks to confirm that the invitee will see no cars

Section titled “R-ACC-185 · For an inviter without the flag, sending an invitation with no rental company ticked asks to confirm that the invitee will see no cars”
  • Status: built
  • Example: given Deka holds user:write at PML and is limited to partners A and B, when Deka invites rina@example.test as checker at PML with no company ticked and sends, then the dialog asks to confirm that Rina will see no cars (R-ACC-169); once confirmed, it calls invite_member() with an empty list (R-ACC-154); cancelled, it sends nothing. Sending with A ticked asks nothing. A super_admin with the flag sees no picker (R-ACC-163) and gets no such confirm.
  • Refusal: none.
  • Who: inviters without the flag, in the invite dialog on /users (R-ACC-163).
  • Source: D100 (sending an invitation with no rental company ticked asks to confirm); the lead in the session on #621. Split from R-ACC-163's Example. Changed by zuki in the session on #748, 2026-11-25; D108.

R-ACC-164 · Reading an invitation's rental companies needs user:read at the invitation's pool

Section titled “R-ACC-164 · Reading an invitation's rental companies needs user:read at the invitation's pool”
  • Status: built
  • Example: given Rina's pending invitation to PML names partner A, when a super_admin at PML reads invitation_rental_companies, then they see A for Rina's invitation; an admin without user:read, or a super_admin at SBY only, sees nothing.
  • Refusal: none: hidden.
  • Who: holders of user:read at the invitation's pool, as R-ACC-99 for the invitation itself. App users never write the table: invite_member() writes it (R-ACC-154). A list of pending invitations with their companies is not built in #616.
  • Source: R-ACC-99; R-ACC-34; the lead in the session on #616 (the read policy through the generated RLS).