feat(ui): hide write UI from users without WRITE_ALL permission

Wrap write-only elements with {#if data.canWrite} in:
- Home page: Neues Dokument link
- Persons list: Neue Person link
- Document detail: Bearbeiten button
- Person detail: edit button, edit form, merge section

Refs #17
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-20 09:47:45 +01:00
parent 03a1a86cdb
commit fde75f3fcf
5 changed files with 12 additions and 1 deletions

View File

@@ -191,6 +191,7 @@ $effect(() => {
<!-- DOCUMENT LIST HEADER -->
<div class="mb-2 flex justify-end">
{#if data.canWrite}
<a
href="/documents/new"
class="inline-flex items-center gap-1 text-sm font-medium text-brand-navy/60 transition-colors hover:text-brand-navy"
@@ -198,6 +199,7 @@ $effect(() => {
<img src="/degruyter-icons/Simple/Medium-24px/SVG/Action/Add/Add-General-MD.svg" alt="" aria-hidden="true" class="h-4 w-4" />
{m.docs_btn_new()}
</a>
{/if}
</div>
<!-- DOCUMENT LIST -->