fix: Disable the permission select on the personal document owner's row

The owner's access comes from the document itself, so the membership
permission is not editable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Tom MoorandClaude Fable 5 committed 2026-09-06 21:02:00 +09:00
1 parent a53d005759
commit 448ba0fae1
1 file changed
+3 -3
@@ -206,8 +206,8 @@ function DocumentMemberList({ document, invitedInSession }: Props) {
);
})}
{members.map((item) => {
// The owner cannot be removed from their own personal document, so
// their row offers neither remove nor leave.
// The owner's access comes from the document itself and cannot be
// changed or removed, so their row is read-only.
const isPersonalOwner = item.id === document.personalOwnerId;
return (
<DocumentMemberListItem
@@ -218,7 +218,7 @@ function DocumentMemberList({ document, invitedInSession }: Props) {
isPersonalOwner ? undefined : () => handleRemoveUser(item)
}
onUpdate={
can.manageUsers
can.manageUsers && !isPersonalOwner
? (permission) => handleUpdateUser(item, permission)
: undefined
}