/* * Copyright (c) 2025 by Christian Kellner. * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ import React from 'react'; import { Navigate } from 'react-router-dom'; export default function PermissionAwareRoute({ currentUser, children }) { const isAdmin = currentUser != null && currentUser.isAdmin; return isAdmin ? children : ; }