fix(credentials): let members leave a shared credential
Merged
WA
7d ago+178+178+012345678901234567890123456789-35-35-01234567890123456789
Summary
DELETE /api/credentials/membershipslets 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)
MemberRowtakes one optionalactioninstead ofcanManage/removeDisabled/onRemove; admins' Remove on other rows is unchanged (skill editors updated to the new props, same behavior)- New
useLeaveCredentialmarks 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-pushtype-check
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing (new tests pass the
test-auditauthoring gate) - No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)