From e2874528cd02c2b6b8b4dc374af417bb8901bf38 Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 20 Mar 2026 16:31:21 +0100 Subject: [PATCH] fix(conversations): hide new document link for read-only users The link navigates to a page that requires WRITE_ALL. Guard it with data.canWrite (supplied by the layout) so read-only users never see a link that leads to a 403. Co-Authored-By: Claude Sonnet 4.6 --- .../src/routes/conversations/+page.svelte | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/frontend/src/routes/conversations/+page.svelte b/frontend/src/routes/conversations/+page.svelte index 436667ec..58fd946f 100644 --- a/frontend/src/routes/conversations/+page.svelte +++ b/frontend/src/routes/conversations/+page.svelte @@ -225,17 +225,19 @@ const enrichedDocuments = $derived( {data.documents.length}

{/if} - - - - - {m.conv_new_doc_link()} - + {#if data.canWrite} + + + + + {m.conv_new_doc_link()} + + {/if}