title: Firebase Database rules data.child
body: <p>I cannot seem to get a read to work as I need it to. Basically, I want a user to read if they are the author, OR read if they are an admin (set by me).</p>
  
  <p>After a write, my DB looks as such:</p>
  
  <pre><code>master
  --messages
  ----&lt;some message id&gt;
        admin: true
        name: "My name"
        text: "Message test"
        uid: &lt;proper firebase auth uid&gt;
  </code></pre>
  
  <p>My rules:</p>
  
  <pre><code>{
  "rules": {
      ".write": "auth != null",
      ".read": "auth != null &amp;&amp; (data.child('uid').val() === auth.uid || data.child('admin').val() === true)",
    }
  }
  </code></pre>
  
  <p>I've run it through the simulator numerous times and manners, yet read is always a fail. I'm wondering if my data.children vars aren't containing what I expect them to have, but I can't find a way to log that.</p>
  
  <p>Any insight?</p>
  
  <p>Edit: screenshots... Er, I don't have the rep to post images. This is the url.
  <a href="https://imgur.com/a/Rt6xW" rel="nofollow noreferrer">https://imgur.com/a/Rt6xW</a></p>