import { Button } from "@/components/ui/button"; import Link from "next/link"; import { getCurrentUser } from "@/lib/auth-session/auth-server"; import { redirect } from "next/navigation"; export default async function ForbiddenPage() { const user = await getCurrentUser(); // If not authenticated, redirect to sign-in if (!user) { redirect("/sign-in"); } // Determine the appropriate dashboard based on role const getDashboardUrl = () => { switch (user.role) { case "admin": return "/admin"; case "dentist": return "/dentist"; case "patient": return "/patient"; default: return "/profile"; } }; return (

403

Access Denied

You don't have permission to access this page.

); }