Skip to content

fix(credentials): let members leave a shared credential - #9605

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/leave-shared-credential
Nov 3, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
fix/leave-shared-credential

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • DELETE /api/credentials/memberships lets any member leave a shared credential (refusing only the last active explicit admin), but the members list hid every row action from non-admins, including on their own row
  • The viewer's own row now shows Leave (with confirm) for members; it navigates back to Integrations or Secrets afterward since explicit membership was their only access
  • Disabled with a tooltip for the last explicit admin, and for workspace/org admins whose credential admin role is inherited (leaving wouldn't remove access)
  • MemberRow takes one optional action instead of canManage/removeDisabled/onRemove; admins' Remove on other rows is unchanged (skill editors updated to the new props, same behavior)
  • New useLeaveCredential marks affected caches stale without refetching the page being left

Type of Change

  • Bug fix

Testing

  • bun run lint, check:react-query, check:client-boundary, check:source-conventions, pre-push type-check

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:01am UTC

Request Review

@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 7 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

@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 new actionable issues were found.

Summary

Adds a confirmed Leave action on the viewer’s own credential row and returns them to Integrations or Secrets afterward.

  • Credential members can leave from their own member row.

Reviews (2) · Last reviewed commit: "fix(credentials): match the last-admin g..." · 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.

No issues found across 11 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 9680032 into staging Nov 3, 2026
79 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/leave-shared-credential branch November 3, 2026 03:43

This branch was previously deployed

1 inactive deployment
Preview — 4f20c775 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