🔒 A Vue.js & Nuxt.js plugin that allows you to use roles and permissions in your components or DOM elements, also compatible as middleware and methods.
I'm trying to access this.$gates.setRoles([...roles]) inside my pinia store, but I'm getting the error TypeError: Cannot read properties of undefined (reading 'setRoles')
Hello,
I'm trying to access
this.$gates.setRoles([...roles])
inside my pinia store, but I'm getting the errorTypeError: Cannot read properties of undefined (reading 'setRoles')
I've also tried with Vue.prototype.$gates, but that does not work either. I've tried to import VueGates at the top, but that did not work either.
Documentation is really bare and should be improved.