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

@@ -74,6 +74,7 @@
</div>
<div class="flex items-center gap-3 flex-shrink-0 ml-4 font-sans">
{#if data.canWrite}
<a
href="/documents/{doc.id}/edit"
class="text-brand-navy bg-transparent border border-brand-navy hover:bg-brand-navy hover:text-white px-4 py-2 rounded text-sm font-medium transition flex items-center gap-2"
@@ -81,6 +82,7 @@
<img src="/degruyter-icons/Simple/Medium-24px/SVG/Action/Edit-Content-MD.svg" alt="" aria-hidden="true" class="w-4 h-4" />
{m.btn_edit()}
</a>
{/if}
{#if doc.filePath}
<a