From c3652f5b5723ce40494574a10940e5bfaa897580 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 31 May 2026 11:07:35 +0200 Subject: [PATCH] fix(ui): hide header upload button from non-writers (#696) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header "Hochladen" link was gated only on {#if data?.user}, so a reader without WRITE_ALL saw it, clicked it, and got bounced by the server-side redirect in documents/new — confusing friction on the main read journey. Gate it on data.canWrite (already on the layout data). Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/routes/+layout.svelte | 2 +- frontend/src/routes/layout.svelte.spec.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 2703ff9c..9dd0d37c 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -75,7 +75,7 @@ const userInitials = $derived.by(() => {