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 = [