Add role base access control for events module

This commit is contained in:
Roman Krček
2025-07-14 15:50:07 +02:00
parent 6466665549
commit f14213a5d4
9 changed files with 68 additions and 36 deletions

View File

@@ -3,6 +3,8 @@
import { QueryClient, QueryClientProvider } from '@tanstack/svelte-query';
import ToastContainer from '$lib/components/ToastContainer.svelte';
let { data } = $props();
const queryClient = new QueryClient({
defaultOptions: {
queries: {
@@ -22,7 +24,9 @@
<ul class="flex space-x-4">
<li><a href="/private/home">Home</a></li>
<li><a href="/private/scanner">Scanner</a></li>
<li><a href="/private/events">Events</a></li>
{#if data.profile?.section_position === 'events_manager'}
<li><a href="/private/events">Events</a></li>
{/if}
</ul>
</div>
</div>