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>
}>
{(note) => {
const canEdit = note().user === currentUserId;
const isOwner = note().user === currentUserId;
const canEdit = isOwner || !note().isPrivate;
return (
<>
@@ -186,7 +187,7 @@ export const NotepadView: Component<{
}}
/>
<div class="flex items-center gap-2 shrink-0 pt-1">
<Show when={canEdit}>
<Show when={isOwner}>
<Button
variant="ghost"
size="sm"
@@ -199,7 +200,7 @@ export const NotepadView: Component<{
</Button>
</Show>
<Show when={canEdit}>
<Show when={isOwner}>
<Button
variant="ghost"
size="icon"