mirror of
https://github.com/outline/outline.git
synced 2026-11-22 14:01:41 +03:00
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:
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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user