Skip to content

fix(organizations): let members leave their organization; remove sign out other devices - #9595

Merged
waleedlatif1 merged 5 commits into
stagingfrom
fix/leave-org-option
Nov 3, 2026
Merged

waleedlatif1 merged 5 commits into
stagingfrom
fix/leave-org-option

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Ordinary members had no way to leave an organization: the only "Leave organization" item lived in the caller's own roster row and was gated on admin access, even though organizations.members.remove already allows any member to remove themselves
  • Moved leave to a "Leave organization" header action on the Members page for every non-owner, so it also works when the org hides the member directory (the roster 403s for members there)
  • Caller role now comes from their roster row, falling back to the full-organization read only while the roster is withheld (non-admins only). Better Auth caps that member list, so large orgs could misread admins as members and hide Invite/seats
  • Leave stays hidden until the roster settles so an owner never sees it flash; owners keep "Transfer ownership"
  • Removed "Sign out other devices" from General settings (button, modal, useSignOutOtherDevices), and the now-dead isAdminOrOwner

Type of Change

  • Bug fix

Testing

  • unsaved-changes-regression.test.tsx (mounts TeamManagement): 36/36 passing
  • bun run lint, pre-push type-check, check:unused-exports baseline shrunk for getUserRole
  • Server self-removal path unchanged (removeOrganizationMember already permits userId === caller; removal-impact already self-readable)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 3, 2026 3:33am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues remain.

Summary

Adds “Leave organization” to the Members page for non-owners and removes “Sign out other devices” from General settings.

  • Organization members can leave from the Members page header.
  • General settings no longer let users sign out other devices.

Reviews (5) · Last reviewed commit: "fix(organizations): refetch the summary ..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 9 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 9 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 9 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 1b72781 into staging Nov 3, 2026
81 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/leave-org-option branch November 3, 2026 03:44

This branch was previously deployed

1 inactive deployment
Preview — 3d379511 Deployed Nov 3, 2026 by vercel[bot]
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