Role control in sub pages
Hi all, I am using a custom hook to check user roles and conditionally render the UI, but I have noticed that the url is not protected, ie if a a url into the browser like http://localhost:3000/some-UI-route/create then the page can be accessed. I have a menu role which restricts access to the "index.tsx" page in the /pages router app but I am not sure how to add a menu role to the "sub" page
└-- some-ui/
├-- index.tsx
├-- edit/
│ └-- [id].tsx
└-- create/
└-- index.tsx
Is there a nice way to do access role control on the sub route?
0 Replies