Add role base access control for events module
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user