Let users request an invite, show pending requests to admins#571
Merged
Conversation
Replaces the dead-end "invite only" page with a request form. People who want to join can leave their email (+ optional reason) and it goes into a pending queue for admin review. auth.InviteRequest store (invite_requests.json): - CreateInviteRequest(email, reason, ip) — new or refreshed entry per email (same address can't flood the list) - ListInviteRequests() — newest first, pending before invited - MarkInviteRequestSent(email) — flagged when an invite is sent - DeleteInviteRequest(email) — admin rejection Signup flow: - GET /signup without a valid invite → renderRequestInvitePage (card with email + optional reason + captcha) - POST /request-invite → captcha check, per-IP rate limit (reuses SignupRateLimit bucket), then CreateInviteRequest + thank-you page. Also added to the CSRF-exempt list (no session yet). Admin /admin/invite: - Now lists pending requests with one-click "Send invite" and "Reject" buttons. Sending marks the request as fulfilled and drops it to the bottom of the list. - Invited requests get a "Resend" button. - Direct invite form stays at the bottom for ad-hoc invites. Home page: - Admin invite link now shows "+ Invite (N waiting)" when there are pending requests, so it's visible without digging into /admin. https://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the dead-end "invite only" page with a request form. People who want to join can leave their email (+ optional reason) and it goes into a pending queue for admin review.
auth.InviteRequest store (invite_requests.json):
Signup flow:
Admin /admin/invite:
Home page:
https://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm