title: Configuring rules for Firestore so user only gets records they own
body: <p>This is a followup to this question<br>
  <a href="https://stackoverflow.com/questions/47472230/firestore-permissions">Firestore permissions</a></p>
  
  <p>I'm trying to set rules on my firestore</p>
  
  <pre><code>service cloud.firestore {
    match /databases/{database}/documents {
      match /analysis/{analysis} {
        allow read, write: if request.auth.uid == resource.data.owner_uid;
      }
    }
  }
  </code></pre>
  
  <p>My goal is<br>
  <strong>a.</strong> When doing a list operation only those documents belonging to a user are returned<br>
  <strong>b.</strong> only documents a user owns can be read or written by that user.</p>
  
  <p>With the above configuration  <strong>b.</strong> is accomplished.<br>
  how do I do accomplish <strong>a.</strong> ?</p>