write access fix

This commit is contained in:
2026-02-27 16:08:09 -06:00
parent b9840f1d32
commit b420533214
+4 -3
View File
@@ -159,7 +159,8 @@ export const NotepadView: Component<{
</div> </div>
}> }>
{(note) => { {(note) => {
const canEdit = note().user === currentUserId; const isOwner = note().user === currentUserId;
const canEdit = isOwner || !note().isPrivate;
return ( return (
<> <>
@@ -186,7 +187,7 @@ export const NotepadView: Component<{
}} }}
/> />
<div class="flex items-center gap-2 shrink-0 pt-1"> <div class="flex items-center gap-2 shrink-0 pt-1">
<Show when={canEdit}> <Show when={isOwner}>
<Button <Button
variant="ghost" variant="ghost"
size="sm" size="sm"
@@ -199,7 +200,7 @@ export const NotepadView: Component<{
</Button> </Button>
</Show> </Show>
<Show when={canEdit}> <Show when={isOwner}>
<Button <Button
variant="ghost" variant="ghost"
size="icon" size="icon"