Skip to content

Global Admin

The global admin portal provides platform-level management capabilities for users with the admin role. It is a dedicated section of the app accessible at /admin, protected by the AdminGuard component which redirects non-admins to the home page.

Admin portal users table with role, status, and security indicators

The platform uses two separate role hierarchies:

ScopeRolesManaged by
Globaladmin, memberBetterAuth admin plugin
Organizationowner, admin, memberBetterAuth organization plugin

Global admins bypass organization-level permission checks — they have implicit access to all org-scoped operations.

All admin endpoints use dedicated adminQuery and adminMutation builders that verify role === "admin" before execution:

packages/backend/src/convex/functions.ts
export const adminQuery = /* ... requires global admin role ... */
export const adminMutation = /* ... requires global admin role ... */

Non-admin users receive a FORBIDDEN error.

The admin portal has a tabbed navigation with six sections:

  1. Users — User management and moderation
  2. Organizations — Org lifecycle management
  3. Waitlist — Pre-launch access control
  4. Audit — Global audit log viewer
  5. Billing — Plan sync and overview
  6. Configure — System-wide settings

Paginated table (25/page) with filters:

FilterOptions
SearchBy email
RoleAdmin, Member
StatusActive, Banned

Columns: Name, Email, Role, Email Verified, 2FA, Passkey, Status, Created, Last Active.

ActionDescription
Copy reset linkGenerate a password reset URL
Set passwordDirectly set a new password
Remove 2FADisable two-factor authentication
Invalidate sessionsForce sign out from all devices
Ban userBlock access with optional reason and expiration
Unban userRestore access for banned user
ImpersonateLogin as the user (blocked for other admins)
Delete userSoft-delete with PII anonymization

Navigating to a user shows:

  • Overview — Name, email, role badge, status (with ban reason if applicable), email verified, 2FA enabled, passkey registered, creation date
  • Audit logs — All actions performed by or on this user, filterable by event name and status

Paginated table with search by name or slug. Columns: Name, Slug, Member count, Created date.

Dialog with name, slug, and owner picker (search users by email). Creates the org directly in the database, bypassing the invitation flow.

Sidebar navigation with five sections:

SectionCapabilities
OverviewName, slug, creation date, member count
MembersTable with roles, add member (bypasses invites), remove member
BillingCurrent subscription, feature usage bars, sync from Autumn
AuditOrg-scoped audit logs with event/status filters
SettingsRead-only org info display

Adding members from admin bypasses the invitation flow — the user is added directly with the specified role.

Displays total, pending, invited, and registered counts.

ActionDescription
SearchFilter by email
FilterBy status (Pending, Invited, Registered)
InviteSend single invite
Bulk inviteInvite multiple selected entries
RemoveDelete from waitlist

Pagination at 25 entries per page with bulk checkbox selection.

Global audit log viewer with comprehensive filtering:

FilterOptions
Actor IDText search
Event nameText search
StatusAll, Success, Failure, Denied
Date rangeFrom/to date picker

Columns: Timestamp, Actor ID, Actor Role, Action, Target Type, Target ID, Status, Org ID, IP.

Features:

  • Actor name resolution (maps IDs to user info)
  • CSV export
  • Pagination at 50 entries per page
ActionDescription
Sync from AutumnPull all plans and features from Autumn to local cache
View plansTable showing name, plan ID, price, free trial, entitlements, status
View featuresList all billing features synced from Autumn

The “Sync from Autumn” button is the primary mechanism for updating the local billing cache after making changes in the Autumn dashboard.

Admin configuration panel with section navigation

System-wide configuration organized into seven sections:

SectionSettings
GeneralSite name, site URL
AuthenticationSelf-signup, email verification, org creation (see below)
Social ProvidersGoogle, GitHub, Apple, Microsoft (enable/disable + credentials)
SecuritySession duration, rate limits, password requirements
EmailSender email/name, transactional email settings
OrganizationMember limits, invitation expiration
WaitlistEnable/disable, email template, Resend segment

All settings are persisted via config_api.upsert() and read via config_api.getAll().

Three authentication toggles control how users access the platform:

ToggleEffect when disabled
Allow self-signupUsers cannot register on their own — they must be invited by an org owner or added by an admin
Allow organization creationUsers cannot create organizations — only global admins can. This effectively enables single-tenant operation or controlled multi-tenancy where the admin decides which orgs exist
WaitlistWhen enabled, users must receive an invite token before they can register. Combines with self-signup to create a gated onboarding flow

These toggles let you adapt RED to different go-to-market strategies: open self-service, invite-only beta, controlled enterprise rollout, or single-tenant deployment.

Admins can impersonate non-admin users to debug issues:

  1. Click “Impersonate” on a user row
  2. BetterAuth creates an impersonation session with impersonatedBy metadata
  3. A yellow warning banner appears at the top of the app showing who is being impersonated
  4. “Stop impersonating” restores the admin session

Admins cannot impersonate other admins — this is enforced by the BetterAuth admin plugin.

All admin mutations are automatically logged with:

  • Actor ID and role
  • Event name (e.g., admin.user.ban, admin.org.create, admin.org.member.add)
  • Target type and ID
  • Organization ID (when applicable)
  • IP address
  • Request details
  • Status (success/failure)
FilePurpose
packages/backend/src/convex/modules/core/admin/admin_user_api.tsUser queries (passkey status, user by ID)
packages/backend/src/convex/modules/core/admin/admin_org_api.tsOrg CRUD, member management, actor resolution
packages/backend/src/convex/functions.tsadminQuery / adminMutation builders
packages/backend/src/convex/lib/core/permissions.tsGlobal and org-level AC definitions
packages/backend/src/convex/lib/core/auth/auth.tsrequirePermission() enforcement
packages/backend/src/convex/modules/core/config/config_api.tsDynamic configuration read/write
packages/web-admin/src/admin.tsxAdmin dashboard layout and navigation
packages/web-admin/src/users-tab.tsxUser management tab
packages/web-admin/src/organizations-tab.tsxOrganization management tab
packages/web-admin/src/billing-tab.tsxBilling sync and overview
packages/web-admin/src/audit-tab.tsxGlobal audit log viewer
packages/web-admin/src/waitlist-tab.tsxWaitlist management
packages/web-admin/src/configure-tab.tsxSystem configuration
packages/web-shell/src/components/admin-guard.tsxRoute guard for admin access
packages/web-shell/src/components/impersonation-banner.tsxImpersonation UI banner