I would like to understand if it was possible to download the routers after login so as not to be able to access the pages unless authorized.
I tried other systems (such as downloading the menu only inherent to the user level), the problem that using the local modification of the file can always bypass the check, so there is a way to download the necessary routers after login so as not to have way to enter unauthorized pages?
but, if you really want to resolve your-issue,
then the only way is to let your server handle “who-can-see-what”.
never trust client-side (technically everything can be bypassed)
I agree with you, but if the function must also go offline it is always better not to be able to select it a priori, then in the upload there will be user verification on the server side.
We are not only talking about security but about the architecture of the application itself, if I have three different users and each user must have a different menu, downloading the menu as in your example it seems that the page that loads it must download it every time is correct ? If it is correct it means that it cannot work offline