E
E
egyptForce2018-08-28 13:56:34
Vue.js
egyptForce, 2018-08-28 13:56:34

How to restrict access to different parts of the site?

How to restrict access of admin panel users to its different parts? I know you can write in the vue routera meta-field data about who can be given access to a specific route and track the whole thing in the .beforeeach global hook. but the problem is that all data on routes and types of users that have access to these routes needs to be pulled from the server when the application is initialized, and I don’t quite understand how in this case I should create an instance of VeRouter, because this will need to be done dynamically + the server must somehow know which components to render to each route. Interested in how to resolve such tasks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Filippenko, 2018-08-28
@alexfilus

https://github.com/cretueusebiu/laravel-nuxt
note how the middleware section is made

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question