title: How to specify different priveleges for different users in firebase?
body: <p>I am designing an app in which some users need to have write access to the database while some can just read data. I am currently using google_sign_in for firebase authentication.
  In my firestore rules I tried this:</p>
  <pre><code>rules_version = '2';
  service cloud.firestore {
    match /databases/{database}/documents {
      match /{document=**} {
        allow read: if request.auth != null;
        allow write: if
            request.auth.token.email == 'test@test.com';
      }
    }
  }
  </code></pre>
  <p>It doesn't work and I don't think its the right way.</p>