Skip to content

Add quick actions to Domain Health for user/domain management#613

Merged
bokelley merged 1 commit into
mainfrom
bokelley/slack-user-emails
Jan 5, 2026
Merged

Add quick actions to Domain Health for user/domain management#613
bokelley merged 1 commit into
mainfrom
bokelley/slack-user-emails

Conversation

@bokelley

@bokelley bokelley commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added "Add to Org" button for misaligned users in Domain Health (users in personal workspaces whose company has an organization)
  • Added "Link Domain" button for organizations without verified domains
  • New API endpoint POST /api/admin/organizations/:orgId/add-users with proper validation and rate limiting

Changes

Backend:

  • Modified misaligned users query to include target_org_id and target_org_name
  • New endpoint with:
    • Bulk operation limit (max 100 users)
    • User ID format validation
    • Proper error handling and logging

Frontend:

  • "Add to {Org Name}" button when target org exists for misaligned users
  • "Link {domain}" button for unverified orgs with corporate user domains
  • Client-side org ID validation before API calls

Test plan

  • Build passes
  • All tests pass
  • UI renders correctly on Domain Health page
  • Code review completed and issues addressed

🤖 Generated with Claude Code

- Add "Add to Org" button for misaligned users (Users Who Should Join Their Company)
  - Modified misaligned_users query to include target_org_id and target_org_name
  - Shows which org the user should be added to based on their email domain
  - One-click to add all users from a domain to the company org

- Add "Link Domain" button for Organizations Without Verified Domains
  - Suggests first corporate domain found from user emails
  - Filters out personal email domains (gmail, yahoo, etc.)
  - One-click to link domain to the organization

- New API endpoint: POST /api/admin/organizations/:orgId/add-users
  - Accepts array of user IDs
  - Validates org exists and is not personal workspace
  - Adds membership records for users
  - Includes input validation and rate limiting (max 100 users)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit 77a6395 into main Jan 5, 2026
6 checks passed
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