refactor: integrate ProtectedRoute component across dashboard pages

- Added the ProtectedRoute component to various dashboard pages to enforce authentication and role-based access control.
- Updated allowedRoles and maxLevel parameters for specific routes to align with the new permission management structure.
- Enhanced user experience by ensuring consistent access checks across the application.
This commit is contained in:
2025-11-14 16:15:21 -03:00
parent 3c371bc35c
commit b503045b41
15 changed files with 95 additions and 71 deletions

View File

@@ -1,8 +1,10 @@
<script lang="ts">
import { Trophy, Award, Plus } from "lucide-svelte";
import { resolve } from "$app/paths";
import ProtectedRoute from "$lib/components/ProtectedRoute.svelte";
</script>
<ProtectedRoute>
<main class="container mx-auto px-4 py-4">
<div class="text-sm breadcrumbs mb-4">
<ul>
@@ -41,4 +43,5 @@
</div>
</div>
</main>
</ProtectedRoute>