ปรับ redirect คนกรอกข้อมูลทะเบียนประวัติ
This commit is contained in:
parent
429e2bde32
commit
67d136c2bb
1 changed files with 5 additions and 1 deletions
|
|
@ -93,7 +93,11 @@ router.beforeEach((to, from, next) => {
|
|||
} else {
|
||||
// keycloak.updateToken(60);
|
||||
const role = keycloak.tokenParsed?.role;
|
||||
if (role.includes(to.meta.Role)) {
|
||||
|
||||
// ถ้าเป็นคนกรอกข้อมูล
|
||||
if (role.includes("keyregistry") && to.meta.Role != "registry") {
|
||||
next({ path: "/registry" });
|
||||
} else if (role.includes(to.meta.Role)) {
|
||||
next();
|
||||
} else {
|
||||
next({ path: "" });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue