title: Is it possible to make a function or class available to all views in Aurelia?
body: <p>The use case is as follows: We would like to have elements hidden or shown, based on the user's permissions.</p>
  
  <p>The ideal way would be something like this:</p>
  
  <pre><code>&lt;div if.bind="foo != bar &amp;&amp; hasPermission('SOME_PERMISSION')"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><code>hasPermission()</code> would in that case be a function that was automatically injected into all viewmodels.</p>
  
  <p>Is that possible? I know we could use base classes for this, but we'd like to avoid that to stay as flexible as possible.</p>