Skip to content

Add user existence check API and link existing users to organizations#44

Merged
LinceMathew merged 1 commit into
masterfrom
fix/usermgt-ai-provider
May 12, 2026
Merged

Add user existence check API and link existing users to organizations#44
LinceMathew merged 1 commit into
masterfrom
fix/usermgt-ai-provider

Conversation

@LinceMathew
Copy link
Copy Markdown
Contributor

Add User Existence Check API and integrate it into the UI.

Overview

This change introduces a new API endpoint to check for existing users by email. The UI is updated to leverage this check, streamlining user creation and management. Default AI connectors are also removed during specific plan downgrades.

Technical Highlights

  • internal/api/server.go: A new API endpoint /orgs/:org_id/users/check is added.
  • internal/api/users/handlers.go: A CheckUser handler is implemented to query user existence.
  • internal/api/users/user_service.go: A CheckUserByEmail method is added to the user service.
  • ui/src/api/users.ts: A checkUserByEmail function is added to the user API client.
  • ui/src/components/UserManagement/UserForm.tsx: The user form integrates the email check API for dynamic validation.
  • storage/license/plan_change_store.go: Logic is added to remove the default AI connector on "free_30k" downgrade.
  • storage/payment/subscription_store.go: Default AI connector deletion is added for various free tier downgrade scenarios.
  • .air.toml: OpenAPI spec file is excluded from live reloading.

…users to organizations during creation, plus auto-remove AI connectors on plan downgrade.

LiveReview Pre-Commit Check: skipped manually
@LinceMathew LinceMathew merged commit 6846180 into master May 12, 2026
14 checks passed
@LinceMathew LinceMathew deleted the fix/usermgt-ai-provider branch May 18, 2026 15:55
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.

1 participant