-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(invitation): allow admins to remove members from workspace #701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR adds critical workspace management functionality by implementing the ability for workspace admins to remove members and revoke pending invitations. Previously, once members were added to a workspace, there was no way to remove them - a significant limitation for workspace administration.
Key changes include:
- New DELETE endpoints for handling member removal and invitation revocation
- Enhanced permission checks to ensure only admins can perform these operations
- Updated WorkspaceUser interface to include membershipId for member management
- Comprehensive test coverage across all new functionality
- UI updates in the workspace selector component to support member removal
The implementation is thorough with proper security considerations, including:
- Preventing removal of the last workspace owner
- Validating invitation status before deletion
- Checking admin permissions before allowing member removal
- Adding proper error handling and user feedback
The code quality is high with extensive test coverage and careful consideration of edge cases.
Confidence score: 4.5/5
- This PR is safe to merge as it adds needed functionality with proper safeguards
- High confidence due to comprehensive test coverage and careful permission handling
- Files needing attention:
- apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-selector/components/invite-modal/invite-modal.tsx (complex UI logic)
- apps/sim/app/api/workspaces/members/[id]/route.ts (critical member removal endpoint)
8 files reviewed, no comments
Edit PR Review Bot Settings | Greptile
e6853cd to
05e5455
Compare
|
✅ No security or compliance issues detected. Reviewed everything up to b266785. Security Overview
Detected Code ChangesThe diff is too large to display a summary of code changes. Reply to this PR with |
05e5455 to
517fbf2
Compare
…udioai#701) * fix(invitation): added ability for admins to remove members of their workspace * lint * remove references to workspace_member db table * remove deprecated @next/font * only allow admin to rename workspace * bring workflow name change inline, remove dialog
Description
Allow admins to remove members from workspace. Previously, when someone was added they couldn't be removed. Also, allows them to revoke a pending invitation.
Type of change
How Has This Been Tested?
Tested manually to ensure it actually kicks the removed member out of the workspace
Checklist:
bun run test)Security Considerations: