title: AND/OR for roles in Loopback's ACLS
body: <p>I have an application where users can have several of different type of roles</p>
  
  <p><strong>Static Roles:</strong> each determines a different level of permissions, a user is mapped to one of these roles</p>
  
  <ul>
  <li><em>adminUser</em></li>
  <li><em>powerUser</em></li>
  <li><em>baseUser</em></li>
  </ul>
  
  <p><strong>Dynamic Role:</strong></p>
  
  <ul>
  <li><em>accountMember</em>: this role is assigned if the resource the user is trying to access belongs to the same account.</li>
  </ul>
  
  <p>Now, let's say I have two endpoints:</p>
  
  <ul>
  <li><em>/addUsers</em> : in order to access this endpoint, a user needs to have the <em>adminUser</em> role as well as the <em>accountMember</em> role <code>adminUser &amp;&amp; accountMember</code></li>
  <li><em>/editUsers</em> : in order to access this endpoint, a user needs to have the <em>adminUser</em> or <em>powerUser</em> role, as well as the <em>accountMember</em> role. e.g. <code>(powerUser || adminUser) &amp;&amp; accountMember</code></li>
  </ul>
  
  <p>Assuming the roles are applied properly, how would I implement the AND/OR logic using loopback's ACLS array?</p>