feat: open stuck problems and AC trend routes to Teacher Admin
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 18:17:32 -06:00
parent 2fbcbd07c5
commit a02e6df604
2 changed files with 4 additions and 2 deletions

View File

@@ -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 },
},
// 题单管理路由
{

View File

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