From bd0720fadb83b0e253ea194a4da8fc683f0f9bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Sat, 12 Sep 2026 22:01:42 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=94=92=20gate=20the=20class=20page?= =?UTF-8?q?s=20so=20a=20parent=20gets=20a=20403,=20not=20a=20crash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - both pages wrapped their content in a bare RouteGuard with no role, so a parent reached them, the component fetched, and the backend's "requires teacher role or higher" bubbled past the guard to the root error boundary as "Something went wrong!" - minRole teacher puts the refusal back where the neighbouring management pages keep it, and the reader now gets the branded 403 card The authorization itself was never open — the server refused all along; what leaked was a crash screen instead of an explanation. --- src/pages/class-detail-page.tsx | 2 +- src/pages/classes-page.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/class-detail-page.tsx b/src/pages/class-detail-page.tsx index 4040aa5..5e0d956 100644 --- a/src/pages/class-detail-page.tsx +++ b/src/pages/class-detail-page.tsx @@ -40,7 +40,7 @@ import { useAuth } from "@/stores/auth-context"; import { useT } from "@/stores/preferences-context"; export default function ClassDetailPage() { - return ; + return ; } function ClassDetailContent() { diff --git a/src/pages/classes-page.tsx b/src/pages/classes-page.tsx index 0432995..3a4a342 100644 --- a/src/pages/classes-page.tsx +++ b/src/pages/classes-page.tsx @@ -33,7 +33,7 @@ import { useT } from "@/stores/preferences-context"; const MEMBER_COUNT_FETCH_CAP = 200; export default function ClassesPage() { - return ; + return ; } function ClassesContent() {