I have a route that is like this:
{ path: '/testpage', component: Testpage},
I am using this to limit the route based on a user role like this:
let roles = {"exdir":"/testpage/"};
if (loggedIn){
// return next('/affiliatepage')
return next(roles[user.user.role]);
}
Now, I am trying to make it so that the user with the correct role can access that route plus all subroutes. For example, if I added:
/testpage/subpage
Is that even possible with the way I have it?