Add enforcement and admin tools for personal vs team accounts#609
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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):Onboarding (
server/public/onboarding.html):UI Updates:
Admin Tools (
server/src/routes/admin/accounts.ts):PUT /admin/accounts/:id/account-type- Convert between personal/teamPOST /admin/accounts/:id/migrate-members- Move members between accountsTest plan
🤖 Generated with Claude Code