From a02e6df6048bac7c120db76c728879197aa430f5 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Tue, 2 Jun 2026 18:17:32 -0600 Subject: [PATCH] feat: open stuck problems and AC trend routes to Teacher Admin Co-Authored-By: Claude Opus 4.6 --- src/routes.ts | 4 ++-- src/utils/permissions.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/routes.ts b/src/routes.ts index a7915ee..dd50748 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -280,13 +280,13 @@ export const admins: RouteRecordRaw = { path: "problem/stuck", name: "admin stuck problems", component: () => import("admin/problem/Stuck.vue"), - meta: { requiresSuperAdmin: true }, + meta: { requiresTeacherAdmin: true }, }, { path: "problem/top_ac_trend", name: "admin top ac trend", component: () => import("admin/problem/TopACTrend.vue"), - meta: { requiresSuperAdmin: true }, + meta: { requiresTeacherAdmin: true }, }, // 题单管理路由 { diff --git a/src/utils/permissions.ts b/src/utils/permissions.ts index d157c5c..3b8b137 100644 --- a/src/utils/permissions.ts +++ b/src/utils/permissions.ts @@ -84,6 +84,8 @@ export function checkRoutePermission(routeName: string): boolean { "admin problemset create", "admin problemset edit", "admin problemset detail", + "admin stuck problems", + "admin top ac trend", ] const problemPermissionRoutes = [