✨ feat (patient): add error page for patient add page permission
This commit is contained in:
@@ -11,14 +11,5 @@ export default defineNuxtRouteMiddleware((to) => {
|
||||
if (!userStore.isAuthenticated) {
|
||||
return navigateTo('/401')
|
||||
}
|
||||
|
||||
// const allowedRoles = to.meta.roles as string[] | undefined
|
||||
// if (allowedRoles && !allowedRoles.includes(userStore.userRole)) {
|
||||
// return navigateTo('/unauthorized')
|
||||
// }
|
||||
// const allowedRoles = to.meta.roles as string[] | undefined
|
||||
// if (allowedRoles && !userStore.userRole.some((r) => allowedRoles.includes(r))) {
|
||||
// return navigateTo('/unauthorized')
|
||||
// }
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user