title: Firebase Security rules comparison logic
body: <p>I have a question about how cloud firestore security rules' logic works:</p>
  
  <p>Lets say I have rule such as this:</p>
  
  <p><code>allow read: if (auth.token.user === true &amp;&amp; request.query.limit &lt; 100 &amp;&amp; uidInDocument()) || auth.token.admin === true &amp;&amp; get(/databases/$(database)/documents/users/$(request.auth.uid)).data.name == "foo";</code></p>
  
  <p>Now, my question here is if the first part of the or statement is true, does that mean that the second part doesn't execute? I'm thinking about this as I don't want to be incurring reads <em>unless</em> it is necessary to do so, in this case if the user is an <code>admin</code></p>
  
  <p>Thanks in advance.</p>