feat: align frontend document and rule management flows
This commit is contained in:
@@ -264,6 +264,8 @@ export async function loader({ request }: LoaderFunctionArgs) {
|
||||
|
||||
if (!isAllowedPath) {
|
||||
console.warn(`⚠️ [Root Loader] 用户尝试访问未授权路由: ${pathname}`);
|
||||
console.warn("⚠️ [Root Loader] 当前允许路由:", allowedPaths);
|
||||
console.warn("⚠️ [Root Loader] 归一化后路径:", normalizeRoutePathForPermission(pathname));
|
||||
// 返回 403 错误,而不是 redirect(避免循环)
|
||||
throw new Response("无权访问此页面", { status: 403 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user