vue-gates icon indicating copy to clipboard operation
vue-gates copied to clipboard

Just asking for clarification and suggestion

Open eokwukwe opened this issue 3 years ago • 0 comments

Hello @williamcruzme

Solution Set the permissions/roles when you log in (before redirect), and enable persistent feature:

Vue.use(LaravelPermissions, { persistent: true });

Recommend solution Work with Nuxt.js, you set the permissions/roles on the server side.

Originally posted by @williamcruzme in https://github.com/williamcruzme/vue-gates/issues/15#issuecomment-594624573

@williamcruzme How can the Recommend solution be implemented. I am having the same situation as mentioned in the issue. Although setting persistence to true seems to solve the problem, do you think it is the best idea to store user permissions in localStorage. Also, I noticed that the localStorage is not cleared when the user logs out.

eokwukwe avatar Aug 01 '21 16:08 eokwukwe