Repository navigation
Offer Remove on an owner's row only to an owner - #2076
Merged
Merged
Conversation
The server now refuses when an admin who isn't an owner removes an owner. The Members list still offered such an admin Remove on a co-owner's row, and the click got a refusal. `removable` says whether a membership can end at all, not who may end it, so the row now also checks the viewer: an owner is offered Remove on another owner, an admin is offered nothing there. Leave on your own row is unchanged. A real-browser test in Chromium and WebKit draws the Members list for an organization with two owners, as an admin and as an owner, wide and on a phone, light and dark. It runs in the WebKit job.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 23, 2026 20:04
This was referenced Nov 23, 2026
davidmckayv
added a commit
that referenced
this pull request
Nov 23, 2026
Offer Remove on an owner's row only to an owner The server now refuses when an admin who isn't an owner removes an owner. The Members list still offered such an admin Remove on a co-owner's row, and the click got a refusal. `removable` says whether a membership can end at all, not who may end it, so the row now also checks the viewer: an owner is offered Remove on another owner, an admin is offered nothing there. Leave on your own row is unchanged. A real-browser test in Chromium and WebKit draws the Members list for an organization with two owners, as an admin and as an owner, wide and on a phone, light and dark. It runs in the WebKit job.
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.
The server refuses when an admin who isn't an owner removes an organization owner: only an owner may remove another owner. The Members list in Organization settings still offered such an admin Remove on a co-owner's row, and the click got a refusal.
What changed
memberControlnow also checks the viewer. On an owner's row, an owner is offered Remove and an admin is offered nothing. Leave on your own row is unchanged.removablestays as it is. It says whether a membership can end at all (it also drives Leave), not who may end it, so the viewer's role is the right signal here.Tests
app/tests/organization-members-remove.test.tsx, in Chromium and WebKit, at 1440 and 390, light and dark: for an organization with two owners, an admin sees Remove only on a member's row, and an owner sees it on both owners too. Fails before the fix (8 of 8 admin cases), passes after (16 of 16). Added to the WebKit job.memberControlcovers a removable co-owner seen by an owner, an admin, and themselves.Screenshots compared before and after: the owner rows lose their Remove for an admin and nothing else on the page moves. The owner's view is unchanged.