williamcruzme / vue-gates

🔒 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.

Home Page:https://williamcruzme.github.io/vue-gates/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue-gates Directives Doest work with Bootstrap-vue tabs

momurad18 opened this issue · comments

commented

Hello sir,

I tried your plugin is work perfect but when I want to hide tabs using v-role="'admin'" it only hides the tab content but it doesnt hide the tab-nav from navigation bar

Thank you

Hey @utechs

In this bootstrap-vue/bootstrap-vue#5477 (comment) issue, they try to do the same :)

<b-tab title="Users" :title-item-class="isAdmin"></b-tab>
computed: {
  isAdmin() {
    return this.$gates.hasRole('admin') ? '' : 'd-none';
  }
}