From 088f82914672d8154c3df8fd3072abd26a0b6fba Mon Sep 17 00:00:00 2001 From: puriphatt Date: Tue, 8 Jul 2025 09:18:33 +0700 Subject: [PATCH] feat: add access control to group management route --- src/router/routes.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/router/routes.ts b/src/router/routes.ts index d878ff0c..4418fb71 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -93,6 +93,10 @@ const routes: RouteRecordRaw[] = [ { path: '/group-management', name: '/group-management', + beforeEnter: (to, from, next) => { + if (canAccess('personnel')) next(); + else next('/'); + }, component: () => import('pages/02_group-management/MainPage.vue'), }, {