feat: add org member invite flow via email#107
feat: add org member invite flow via email#107engineering-props-to wants to merge 3 commits intomainfrom
Conversation
Adds email-based invitation for org admins to invite users who haven't yet signed up. - Add OrganizationInvite Prisma model with unique token, expiry, revoke/accept lifecycle - Repo layer: createInvite, getByToken, listPending, revoke, resend, accept, getByEmail - Email: OrgInviteEmail template + sendOrgInviteEmail sender - Server actions: inviteMembers, revokeInvite, resendInvite (gated by verifyOrgAdminAccess + allowUserInvites setting) - UI: InviteDialog (multi-email, role select, optional message) + PendingInvites table (resend/revoke) - Members page: adds Invite Members button and pending invites section for admins - Auth app: /invite?token=... page validates token, accepts invite, adds user to org, redirects - Migration: 20260322000000_add_organization_invite Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
🚀 App preview deployment successfull at https://app.pr-107.props.build |
|
🛑 Web preview deployment failed — View details |
|
🚀 Auth preview deployment successfull at https://auth.pr-107.props.build |
The react-email export tool renders templates with no arguments to generate static previews. Add defaults for all required props to prevent the `role.toLowerCase()` crash. Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
🚀 Auth preview deployment successfull at https://auth.pr-107.props.build |
|
🚀 Web preview deployment successfull at https://web.pr-107.props.build |
|
🚀 App preview deployment successfull at https://app.pr-107.props.build |
|
❌ E2E Tests Failed Tested against: |
|
🚀 Auth preview deployment successfull at https://auth.pr-107.props.build |
QA Review — org member invite flow (PR #107)What Was Tested
UI renders cleanly, error states are all handled gracefully, and the auth redirect flow is correct. Code Review Findings🐛 Bug — Unique constraint will crash re-invites silentlyThe In Fix: Use
|
Summary
OrganizationInvitePrisma model with unique token, 24h expiry, role, revoke/accept lifecycle/invite?token=...accept route — handles both new and existing users, redirects to org after joinTest plan
/org/[slug]/admin/membershttp://0.0.0.0:1080)allowUserInvites = falsereturns error from actionpnpm --filter @propsto/data db-migrateto apply the migrationCloses PROAAA-14
🤖 Generated with Claude Code