export function ByjovePlugin(Vue) { Vue.mixin({ methods: { $hasPerm(name) { // if user is root then assume permission if (this.$store.state.user_is_root) { return true } // otherwise do true perm check for user return this.$store.state.permissions.includes(name) }, } }) }