feat(service): seal a workspace's pending invitations for following over Neon Realtime
Merged
CH
7d ago+291+291+012345678901234567890123456789-6-6-0123456789
The service side of a workspace's live pending invitations. Stacked on #3942.
- New live procedure
live.workspaceInvitations:- an owner or an admin gets one sealed statement plus the service's
originfor accept links - a plain member gets not-permitted, and an outsider not-found
- an owner or an admin gets one sealed statement plus the service's
- Statement: reads the plugin's pending
invitationrows and gates on the reader's managing role. - Expiry filter on the desktop:
expiresAt > nowmoves toworkspaceInvitationsOfLiveRows, so the statement stays deterministic.
Tests
- Parity against Better Auth's real plugin over PGlite: canceled and expired invitations, an owner and an admin, and a member and an outsider who get nothing.
- Procedure test.
- Immutability check.
Made with Luke