title: Angular Material Tree with authenticated tree nodes
body: <p>I'm looking for a way to build an authenticated tree node to be able to show and hide nodes dependent on the users role. Currently you can set it to not render the inner part of the tree node if the when: result is true, but it still renders the mat-tree-node component, which I do not want.</p>
  
  <p>I wanted to extend the MatTreeNodeDef and add an extra input <a href="https://www.codementor.io/christiannwamba/build-custom-directives-in-angular-2-jlqrk7dpw" rel="nofollow noreferrer">here</a>, but the CDKTree only allows for 1 defaultNode that isn't a when.</p>
  
  <pre><code>if (defaultNodeDefs.length &gt; 1) {
    throw getTreeMultipleDefaultNodeDefsError();
  }
  </code></pre>
  
  <p>Any ideas would be greatly appreciated. </p>