title: Vuex Return boolean?
body: <p>I'm trying to make a function that I can call in my templates called hasPermission with a string. However when I call it, vuex returns a promise object. Is there anyway I can make it return a boolean?</p>
  
  <pre><code>hasPermission({ state }, permission) {
    for (var i = 0; i &lt; state.user.permissions.length; i++) {
      var perm = state.user.permissions[i];
      if (perm.name == permission) {
        return true;
      }
    }
    return false;
  }
  </code></pre>
  
  <p>I want to simply be able to call it like v-if="hasPermission("test") and then show based off of the response. However I'm having a bit of a hard time doing this. Would love any advice you can give :) </p>