Answer the question
In order to leave comments, you need to log in
Menu generation from request or manually?
Question: there is a written application in vue, menus and routes are still hard-coded ...
backend (simple api in php) and the client are running on different servers, respectively, when navigating through the pages on the client, requests are sent for data, etc. ...
All the salt in that users have roles: admin user, etc., and depending on the role, you need to generate a menu (pages are open for someone, closed for someone, etc.)
What is the best way to implement this?
Now the scenario is as follows: when the application is initialized, a request is sent to verify authentication (we also define the role there) - depending on the role, we return a list of URLs available to the user - we generate a menu
The pages remain hardwired into the application, the only thing is that every time a request is sent for data, where we also check accesses, etc.
Is there a way to make this more concise?
I don't really like the option "And so it will do"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question