Skip to content

Add enforcement and admin tools for personal vs team accounts#609

Merged
bokelley merged 2 commits into
mainfrom
bokelley/fix-individual-accounts
Jan 5, 2026
Merged

Add enforcement and admin tools for personal vs team accounts#609
bokelley merged 2 commits into
mainfrom
bokelley/fix-individual-accounts

Conversation

@bokelley

@bokelley bokelley commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Enforce personal workspace restrictions (block invitations, join requests, and domain verification for personal accounts)
  • Update onboarding to clarify individual account limitations with prominent warning
  • Hide team features in UI for personal workspaces
  • Add admin tools to convert account types and migrate members between accounts

Context

Personal workspaces (is_personal: true) weren't properly restricted from team features. This caused confusion like Pia's Workspace having 3 Celtra employees when it should be a personal account, while a separate Celtra prospect account exists with the domain claimed.

Changes

Backend Enforcement (server/src/routes/organizations.ts):

  • Invitation endpoint rejects personal workspaces
  • Join request approval rejects personal workspaces
  • Domain verification rejects personal workspaces

Onboarding (server/public/onboarding.html):

  • Updated individual option description
  • Added warning box listing restrictions (no team members, no domains, no directory listing)
  • Added link to go back if user meant to select company

UI Updates:

  • Hide Team nav item for personal workspaces
  • Hide Team section on dashboard
  • Show notice on team page explaining limitations

Admin Tools (server/src/routes/admin/accounts.ts):

  • PUT /admin/accounts/:id/account-type - Convert between personal/team
  • POST /admin/accounts/:id/migrate-members - Move members between accounts
  • UI: Account type badge (clickable), Migrate Members modal

Test plan

  • Try to invite someone to a personal workspace - should be blocked
  • View personal workspace dashboard - Team section should be hidden
  • Create new individual account - should see warning about limitations
  • Admin: Convert team to personal (with 1 member) - should work
  • Admin: Convert team to personal (with multiple members) - should show error
  • Admin: Migrate members between accounts

🤖 Generated with Claude Code

bokelley and others added 2 commits January 4, 2026 19:29
- Enforce personal workspace restrictions:
  - Block invitations to personal workspaces
  - Block join request approval for personal workspaces
  - Block domain verification for personal workspaces

- Update onboarding to clarify individual account limitations:
  - Updated description on individual option
  - Added prominent warning box listing restrictions
  - Added link to go back if user meant to join as company

- Update UI to hide team features for personal workspaces:
  - Hide Team nav item in dashboard sidebar
  - Hide Team section on main dashboard
  - Show notice on team page explaining limitations

- Add admin tools for account management:
  - PUT /admin/accounts/:id/account-type - convert between personal/team
  - POST /admin/accounts/:id/migrate-members - move members between accounts
  - Account type badge on admin detail page (clickable to convert)
  - Migrate Members modal with member selection

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix race condition: add to target org before removing from source
- Update local cache when migrating members to target org
- Add validation for user_ids array in migrate-members endpoint
- Fix duplicate HTML ID (migrateMembersBtn -> migrateMembersSubmitBtn)
- Add changeset

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit 325ece1 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