Skip to content

Implement Admin Page - #133

Open
Shengle-Dai wants to merge 4 commits into
mainfrom
admin-paeg
Open

Implement Admin Page#133
Shengle-Dai wants to merge 4 commits into
mainfrom
admin-paeg

Conversation

@Shengle-Dai

@Shengle-Dai Shengle-Dai commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Adds a platform admin page at /admin for approving organizations. A new backend admin module provides API endpoints (GET /admin/verify, GET /admin/organizations, POST /admin/organizations/:id/authorize) gated by an authorizeAdmin middleware that checks the authenticated user's email with ADMIN_EMAILS env variable. The frontend admin page displays organizations in a table (Pending/Approved/All) with approve and revoke buttons. Non-admin users are redirected away from the page.

image

@vercel

vercel Bot commented Apr 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
curaise Ready Ready Preview, Comment Apr 12, 2026 8:06am

Comment on lines +39 to +41
validate({ params: OrganizationParams, body: UpdateOrganizationAuthorizedBody }),
authenticate,
authorizeAdmin,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reorder the middleware to authenticate, authorizeAdmin, validate to match the other routes and prevent unauthenticated callers from inspecting the body schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants