fix: hide global audit log switch for non admin users

This commit is contained in:
Elias Schneider
2025-04-28 10:38:53 +02:00
parent 0a24ab8001
commit 1efd1d182d

View File

@@ -2,6 +2,7 @@
import AuditLogList from '$lib/components/audit-log-list.svelte';
import * as Card from '$lib/components/ui/card';
import { m } from '$lib/paraglide/messages';
import userStore from '$lib/stores/user-store';
import { LogsIcon } from 'lucide-svelte';
import AuditLogSwitcher from './audit-log-switcher.svelte';
@@ -13,7 +14,9 @@
<title>{m.audit_log()}</title>
</svelte:head>
<AuditLogSwitcher currentPage="personal" />
{#if $userStore?.isAdmin}
<AuditLogSwitcher currentPage="personal" />
{/if}
<div>
<Card.Root>