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

@@ -25,6 +25,7 @@ function handleSearch(e: Event) {
<p class="mt-2 max-w-xl font-sans text-sm text-brand-navy/60">
{m.persons_subtitle()}
</p>
{#if data.canWrite}
<a
href="/persons/new"
class="mt-3 inline-flex items-center gap-1 text-sm font-medium text-brand-navy/60 transition-colors hover:text-brand-navy"
@@ -32,6 +33,7 @@ function handleSearch(e: Event) {
<img src="/degruyter-icons/Simple/Medium-24px/SVG/Action/Add/Add-General-MD.svg" alt="" aria-hidden="true" class="h-4 w-4" />
{m.persons_btn_new()}
</a>
{/if}
</div>
<!-- Search Input -->