How to apply access control to different routes in quasar?
There s a plugin called vue-acl which actually allows access control.But it cant be used with quasar
If it can be used with Vue Router 2.x then there’s nothing stopping it from working with Quasar as it doesn’t interfere at all.
What I’d recommend is doing your own access control. Read Vue Router documentation. It’s easy: https://router.vuejs.org/en/advanced/navigation-guards.html
The answer given by admin is not very explanatory. I am having the same problem as accessing the status in the routes.js file, I am using the SSR version.
What I did was import the store in the routes.js file but this apparently creates a new store instance and the state settings through actions and mutations do not seem to work.
How would be the correct way to reference the store in the routes.js file in order to use navigation guards?
The question given by the asker is not very explanatory. Can you paste some code on how/where the imports are and now the library is integrated? Also you may want to check out vuex router-sync if you haven’t already.